Skip to content

Commit 15df4bd

Browse files
authoredJul 9, 2021
Merge pull request #9 from breml/add-mustache
Add mustache
2 parents f48df7a + 2927b7f commit 15df4bd

24 files changed

+891
-83
lines changed
 

‎.github/workflows/release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
-
19+
name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.16
23+
24+
-
25+
name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v2
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --rm-dist
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/test.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ jobs:
1313
test:
1414
strategy:
1515
matrix:
16-
go-version: [1.14.x, 1.15.x]
16+
go-version: [1.15.x, 1.16.x]
1717
os: [ubuntu-latest, macos-latest, windows-latest]
1818
runs-on: ${{ matrix.os }}
1919
steps:
20-
- name: Install Go
20+
-
21+
name: Install Go
2122
uses: actions/setup-go@v2
2223
with:
2324
go-version: ${{ matrix.go-version }}
24-
- name: Checkout code
25+
26+
-
27+
name: Checkout code
2528
uses: actions/checkout@v2
26-
- name: Test
29+
30+
-
31+
name: Build
32+
run: go build ./...
33+
34+
-
35+
name: Test
2736
run: go test -v -cover ./...

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@
2020

2121
.idea/
2222
*~
23+
24+
# Goreleaser
25+
dist/

‎.goreleaser.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is an example .goreleaser.yml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
builds:
8+
- main: ./cmd/mustache
9+
binary: mustache
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
archives:
17+
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
18+
replacements:
19+
darwin: Darwin
20+
linux: Linux
21+
windows: Windows
22+
386: i386
23+
amd64: x86_64
24+
snapshot:
25+
name_template: "{{ .Tag }}-next"
26+
changelog:
27+
skip: true
28+
release:
29+
github:
30+
owner: breml
31+
name: logstash-config

‎README.md

+38-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# logstash-config : parser and abstract syntax tree for [Logstash](https://github.com/elastic/logstash) config files
1+
# logstash-config : parser and abstract syntax tree for [Logstash](https://www.elastic.co/logstash/) config files
22

33
[![Test Status](https://github.com/breml/logstash-config/workflows/Test/badge.svg)](https://github.com/breml/logstash-config/actions?query=workflow%3ATest)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/breml/logstash-config)](https://goreportcard.com/report/github.com/breml/logstash-config)\
5-
[![GoDoc](https://godoc.org/github.com/breml/logstash-config?status.svg)](https://godoc.org/github.com/breml/logstash-config) [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE)
5+
[![GoDoc](https://pkg.go.dev/badge/github.com/breml/logstash-config)](https://pkg.go.dev/github.com/breml/logstash-config) [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE)
66

77
## Overview
88

9-
The Go package config provides a ready to use parser for [Logstash](https://github.com/elastic/logstash) configuration files.
9+
The Go package config provides a ready to use parser for Logstash ([github](https://github.com/elastic/logstash)) configuration files.
1010

1111
The basis of the grammar for the parsing of the Logstash configuration format is the original [Logstash Treetop grammar](https://github.com/elastic/logstash/blob/master/logstash-core/lib/logstash/config/grammar.treetop) which could be used with only minor changes.
1212

@@ -22,10 +22,42 @@ go get -t github.com/breml/logstash-config/...
2222

2323
## Usage
2424

25-
### ls-config-check
25+
### mustache
2626

27-
`cmd/ls-config-check` contains the source code for a small sample tool, which uses just allow to parse a given Logstash config file. If the file could be parsed successfully, the tool just exits with exit code `0`. If the parsing fails, the exit code is non zero and a error message, indicating the location, where the parsing failed, is printed.
28-
`ls-config-check <logstash-config-file>` could be used instead if `bin/logstash -f <logstash-config-file> -t`, which is orders of magnitude faster 😃.
27+
`mustache` is a command line tool that allows to syntax check, lint and format Logstash configuration files. The name of
28+
the tool is inspired by the original Logstash Logo ([wooden character with an eye-catching mustache](https://www.elastic.co/de/blog/high-level-logstash-roadmap-is-published)).
29+
30+
The `check` command verifies the syntax of Logstash configuration files:
31+
32+
```shell
33+
mustache check file.conf
34+
```
35+
36+
The `lint` command checks for problems in Logstash configuration files.
37+
38+
The following checks are performed:
39+
40+
* Valid Logstash configuration file syntax
41+
* No comments in exceptional places (these are comments, that are valid by the Logstash configuration file syntax, but
42+
but are located in exceptional or uncommon locations)
43+
* Precence of an `id` attribute for each plugin in the Logstash configuration
44+
45+
If the `--auto-fix-id` flag is passed, each plugin gets automatically an ID. Be aware, that this potentially reformats
46+
the Logstash configuration files.
47+
48+
```shell
49+
mustache lint --auto-fix-id file.conf
50+
```
51+
52+
With the `format` command, mustache returns the provided configuration files in a standardized format (indentation,
53+
location of comments). By default, the reformatted file is print to standard out. If the flag `--write-to-source`
54+
is provided, the Logstash config files are reformatted in place.
55+
56+
```shell
57+
mustache format --write-to-source file.conf
58+
```
59+
60+
Use the `--help` flag to get more information about the usage of the tool.
2961

3062
## Rebuild parser
3163

‎cmd/ls-config-check/.gitignore

-2
This file was deleted.

‎cmd/ls-config-check/README.md

-18
This file was deleted.

‎cmd/ls-config-check/main.go

-46
This file was deleted.

‎cmd/mustache/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mustache

‎cmd/mustache/main.go

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"github.com/breml/logstash-config/internal/app"
7+
)
8+
9+
var Version = "(unknown)"
10+
11+
func main() {
12+
exitCode := app.Execute(Version, os.Stdout, os.Stderr)
13+
os.Exit(exitCode)
14+
}

‎go.mod

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ module github.com/breml/logstash-config
33
go 1.14
44

55
require (
6+
github.com/hashicorp/go-multierror v1.1.0
67
github.com/kr/pretty v0.2.0 // indirect
8+
github.com/pkg/errors v0.9.1
79
github.com/sergi/go-diff v1.1.0
10+
github.com/spf13/cobra v1.1.3
11+
github.com/spf13/viper v1.7.1
812
github.com/stretchr/testify v1.5.1 // indirect
9-
gopkg.in/yaml.v2 v2.3.0 // indirect
1013
)

‎go.sum

+302-2
Large diffs are not rendered by default.

‎internal/app/app.go

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package app
2+
3+
import (
4+
"fmt"
5+
"io"
6+
"os"
7+
"path"
8+
9+
"github.com/spf13/cobra"
10+
"github.com/spf13/viper"
11+
)
12+
13+
const (
14+
exitCodeNormal = 0
15+
exitCodeError = 1
16+
)
17+
18+
func Execute(version string, stdout, stderr io.Writer) int {
19+
configDir, err := os.UserConfigDir()
20+
if err == nil {
21+
configDir = path.Join(configDir, "mustache")
22+
}
23+
24+
// Initialize config
25+
viper.SetConfigName("mustache")
26+
viper.AddConfigPath(".")
27+
if configDir != "" {
28+
viper.AddConfigPath(configDir)
29+
}
30+
31+
// Setup default values
32+
33+
// Read config
34+
if err := viper.ReadInConfig(); err != nil {
35+
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
36+
fmt.Fprintf(stderr, "error processing config file: %v", err)
37+
return exitCodeError
38+
}
39+
}
40+
41+
rootCmd := makeRootCmd(version)
42+
rootCmd.SetOut(stdout)
43+
rootCmd.SetErr(stderr)
44+
rootCmd.SilenceUsage = true
45+
46+
if err := rootCmd.Execute(); err != nil {
47+
fmt.Fprintf(stderr, "error: %v", err)
48+
return exitCodeError
49+
}
50+
51+
return exitCodeNormal
52+
}
53+
54+
func makeRootCmd(version string) *cobra.Command {
55+
rootCmd := &cobra.Command{
56+
Use: "mustache",
57+
Run: func(cmd *cobra.Command, args []string) {
58+
_ = cmd.Help()
59+
},
60+
SilenceErrors: true,
61+
Version: version,
62+
}
63+
64+
rootCmd.InitDefaultVersionFlag()
65+
66+
rootCmd.AddCommand(makeCheckCmd())
67+
rootCmd.AddCommand(makeFormatCmd())
68+
rootCmd.AddCommand(makeLintCmd())
69+
70+
return rootCmd
71+
}

‎internal/app/check.go

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package app
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
"github.com/breml/logstash-config/internal/app/check"
7+
)
8+
9+
func makeCheckCmd() *cobra.Command {
10+
cmd := &cobra.Command{
11+
Use: "check [path ...]",
12+
Short: "syntax check for logstash config files",
13+
RunE: runCheck,
14+
SilenceErrors: true,
15+
}
16+
17+
return cmd
18+
}
19+
20+
func runCheck(cmd *cobra.Command, args []string) error {
21+
check := check.New()
22+
return check.Run(args)
23+
}

‎internal/app/check/check.go

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package check
2+
3+
import (
4+
"os"
5+
"strings"
6+
7+
"github.com/hashicorp/go-multierror"
8+
"github.com/pkg/errors"
9+
10+
config "github.com/breml/logstash-config"
11+
"github.com/breml/logstash-config/internal/format"
12+
)
13+
14+
type Check struct{}
15+
16+
func New() Check {
17+
return Check{}
18+
}
19+
20+
func (f Check) Run(args []string) error {
21+
var result *multierror.Error
22+
23+
for _, filename := range args {
24+
stat, err := os.Stat(filename)
25+
if err != nil {
26+
result = multierror.Append(result, errors.Errorf("%s: %v", filename, err))
27+
}
28+
if stat.IsDir() {
29+
continue
30+
}
31+
32+
_, err = config.ParseFile(filename, config.IgnoreComments(true))
33+
if err != nil {
34+
if errMsg, hasErr := config.GetFarthestFailure(); hasErr {
35+
if !strings.Contains(err.Error(), errMsg) {
36+
err = errors.Errorf("%s: %v\n%s", filename, err, errMsg)
37+
}
38+
}
39+
result = multierror.Append(result, errors.Errorf("%s: %v", filename, err))
40+
continue
41+
}
42+
}
43+
44+
if result != nil {
45+
result.ErrorFormat = format.MultiErr
46+
return result
47+
}
48+
49+
return nil
50+
}

‎internal/app/format.go

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package app
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
"github.com/breml/logstash-config/internal/app/format"
7+
)
8+
9+
func makeFormatCmd() *cobra.Command {
10+
cmd := &cobra.Command{
11+
Use: "format [path ...]",
12+
Short: "pretty format logstash config files",
13+
RunE: runFormat,
14+
SilenceErrors: true,
15+
}
16+
17+
cmd.Flags().BoolP("write-to-source", "w", false, "write result to (source) file instead of stdout")
18+
19+
return cmd
20+
}
21+
22+
func runFormat(cmd *cobra.Command, args []string) error {
23+
writeToSource, _ := cmd.Flags().GetBool("write-to-source")
24+
25+
format := format.New(cmd.OutOrStdout(), writeToSource)
26+
return format.Run(args)
27+
}

‎internal/app/format/format.go

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
package format
2+
3+
import (
4+
"fmt"
5+
"io"
6+
"os"
7+
"strings"
8+
9+
"github.com/pkg/errors"
10+
11+
config "github.com/breml/logstash-config"
12+
"github.com/breml/logstash-config/ast"
13+
)
14+
15+
type Format struct {
16+
out io.Writer
17+
writeToSource bool
18+
}
19+
20+
func New(out io.Writer, writeToSource bool) Format {
21+
return Format{
22+
out: out,
23+
writeToSource: writeToSource,
24+
}
25+
}
26+
27+
func (f Format) Run(args []string) error {
28+
for _, filename := range args {
29+
stat, err := os.Stat(filename)
30+
if err != nil {
31+
return errors.Errorf("%s: %v", filename, err)
32+
}
33+
if stat.IsDir() {
34+
continue
35+
}
36+
37+
c, err := config.ParseFile(filename)
38+
if err != nil {
39+
if errMsg, hasErr := config.GetFarthestFailure(); hasErr {
40+
if !strings.Contains(err.Error(), errMsg) {
41+
return errors.Errorf("%s: %v\n%s", filename, err, errMsg)
42+
}
43+
}
44+
return errors.Errorf("%s: %v", filename, err)
45+
}
46+
47+
if f.writeToSource {
48+
err := func() error {
49+
f, err := os.Create(filename)
50+
if err != nil {
51+
return errors.Wrap(err, "failed to open file for writting with automatically fixed ID")
52+
}
53+
defer f.Close()
54+
55+
conf := c.(ast.Config)
56+
_, err = f.WriteString(conf.String())
57+
if err != nil {
58+
return errors.Wrap(err, "failed to write file with automatically fixed ID")
59+
}
60+
61+
return nil
62+
}()
63+
if err != nil {
64+
return err
65+
}
66+
continue
67+
}
68+
69+
fmt.Fprint(f.out, c)
70+
}
71+
72+
return nil
73+
}

‎internal/app/lint.go

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package app
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
"github.com/breml/logstash-config/internal/app/lint"
7+
)
8+
9+
func makeLintCmd() *cobra.Command {
10+
cmd := &cobra.Command{
11+
Use: "lint [path ...]",
12+
Short: "lint for logstash config files",
13+
RunE: runLint,
14+
SilenceErrors: true,
15+
}
16+
17+
cmd.Flags().Bool("auto-fix-id", false, "add an autogenerated Logstash plugin id to the configuration, if the ID is missing")
18+
19+
return cmd
20+
}
21+
22+
func runLint(cmd *cobra.Command, args []string) error {
23+
autoFixID, _ := cmd.Flags().GetBool("auto-fix-id")
24+
25+
lint := lint.New(autoFixID)
26+
return lint.Run(args)
27+
}

‎internal/app/lint/lint.go

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
package lint
2+
3+
import (
4+
"fmt"
5+
"os"
6+
"strings"
7+
8+
"github.com/hashicorp/go-multierror"
9+
"github.com/pkg/errors"
10+
11+
config "github.com/breml/logstash-config"
12+
"github.com/breml/logstash-config/ast"
13+
"github.com/breml/logstash-config/ast/astutil"
14+
"github.com/breml/logstash-config/internal/format"
15+
)
16+
17+
type Lint struct {
18+
autoFixID bool
19+
}
20+
21+
func New(autoFixID bool) Lint {
22+
return Lint{
23+
autoFixID: autoFixID,
24+
}
25+
}
26+
27+
func (l Lint) Run(args []string) error {
28+
var result *multierror.Error
29+
30+
for _, filename := range args {
31+
stat, err := os.Stat(filename)
32+
if err != nil {
33+
result = multierror.Append(result, errors.Errorf("%s: %v", filename, err))
34+
}
35+
if stat.IsDir() {
36+
continue
37+
}
38+
39+
c, err := config.ParseFile(filename, config.ExceptionalCommentsWarning(true))
40+
if err != nil {
41+
if errMsg, hasErr := config.GetFarthestFailure(); hasErr {
42+
if !strings.Contains(err.Error(), errMsg) {
43+
err = errors.Errorf("%s: %v\n%s", filename, err, errMsg)
44+
}
45+
}
46+
result = multierror.Append(result, errors.Errorf("%s: %v", filename, err))
47+
continue
48+
}
49+
conf := c.(ast.Config)
50+
for _, warning := range conf.Warnings {
51+
result = multierror.Append(result, errors.New(warning))
52+
}
53+
54+
v := validator{
55+
autoFixID: l.autoFixID,
56+
}
57+
58+
for i := range conf.Input {
59+
astutil.ApplyPlugins(conf.Input[i].BranchOrPlugins, v.walk)
60+
}
61+
for i := range conf.Filter {
62+
astutil.ApplyPlugins(conf.Filter[i].BranchOrPlugins, v.walk)
63+
}
64+
for i := range conf.Output {
65+
astutil.ApplyPlugins(conf.Output[i].BranchOrPlugins, v.walk)
66+
}
67+
68+
if len(v.noIDs) > 0 {
69+
errMsg := strings.Builder{}
70+
errMsg.WriteString(fmt.Sprintf("%s: no IDs found for:\n", filename))
71+
for _, block := range v.noIDs {
72+
errMsg.WriteString(block + "\n")
73+
}
74+
result = multierror.Append(result, errors.New(errMsg.String()))
75+
}
76+
77+
if l.autoFixID && v.changed {
78+
func() {
79+
f, err := os.Create(filename)
80+
if err != nil {
81+
result = multierror.Append(result, errors.Wrap(err, "failed to open file for writting with automatically fixed ID"))
82+
return
83+
}
84+
defer f.Close()
85+
86+
_, err = f.WriteString(conf.String())
87+
if err != nil {
88+
result = multierror.Append(result, errors.Wrap(err, "failed to write file with automatically fixed ID"))
89+
return
90+
}
91+
}()
92+
}
93+
}
94+
95+
if result != nil {
96+
result.ErrorFormat = format.MultiErr
97+
return result
98+
}
99+
100+
return nil
101+
}
102+
103+
type validator struct {
104+
count int
105+
noIDs []string
106+
autoFixID bool
107+
changed bool
108+
}
109+
110+
func (v *validator) walk(c *astutil.Cursor) {
111+
v.count++
112+
113+
_, err := c.Plugin().ID()
114+
if err != nil {
115+
if v.autoFixID {
116+
v.changed = true
117+
118+
plugin := c.Plugin()
119+
plugin.Attributes = append(plugin.Attributes, ast.NewStringAttribute("id", fmt.Sprintf("%s-%d", c.Plugin().Name(), v.count), ast.DoubleQuoted))
120+
121+
c.Replace(plugin)
122+
} else {
123+
v.noIDs = append(v.noIDs, fmt.Sprintf("%s: %s", c.Plugin().Pos().String(), c.Plugin().Name()))
124+
}
125+
}
126+
}

‎internal/format/multierr.go

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package format
2+
3+
import (
4+
"bytes"
5+
"fmt"
6+
"strings"
7+
)
8+
9+
func MultiErr(es []error) string {
10+
if len(es) == 1 {
11+
return fmt.Sprintf("1 error occurred:\n%s\n", prefix(es[0].Error()))
12+
}
13+
14+
points := make([]string, len(es))
15+
for i, err := range es {
16+
points[i] = prefix(err.Error())
17+
}
18+
19+
return fmt.Sprintf(
20+
"%d errors occurred:\n%s\n",
21+
len(es), strings.Join(points, "\n"))
22+
}
23+
24+
func prefix(in string) string {
25+
var s bytes.Buffer
26+
lines := strings.Split(strings.TrimRight(in, "\n"), "\n")
27+
for i, l := range lines {
28+
if i == 0 {
29+
s.WriteString(fmt.Sprintln("\t* " + l))
30+
continue
31+
}
32+
s.WriteString(fmt.Sprintln("\t " + l))
33+
}
34+
return s.String()
35+
}

‎logstash_config_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ func TestParseErrors(t *testing.T) {
702702
expectedError: `expect plugin type`,
703703
},
704704
{
705-
name: "missing closing curly backet (pluginsection)",
705+
name: "missing closing curly bracket (pluginsection)",
706706
input: `filter {
707707
if 1 == 1 {
708708
plugin{}
@@ -891,7 +891,7 @@ func TestParseErrors(t *testing.T) {
891891
expectedError: `expect not in operator`,
892892
},
893893
{
894-
name: "missing closing squre bracket",
894+
name: "missing closing square bracket",
895895
input: `filter {
896896
if "test" in [field][subfield {
897897
plugin{}

‎parse_error_helper.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package config
33
import (
44
"bytes"
55
"fmt"
6+
"strings"
67
)
78

89
type errPos struct {
@@ -18,7 +19,7 @@ var farthestFailure []errPos
1819
func GetFarthestFailure() (string, bool) {
1920
if len(farthestFailure) > 0 {
2021
var bb bytes.Buffer
21-
bb.WriteString(fmt.Sprintf("Parsing error at pos %s and [%d] (after: '%s'):\n", farthestFailure[0].c.pos, farthestFailure[0].pos, string(farthestFailure[0].c.text)))
22+
bb.WriteString(fmt.Sprintf("Parsing error at pos %s and [%d] (after: '%s'):\n", farthestFailure[0].c.pos, farthestFailure[0].pos, showNewline(string(farthestFailure[0].c.text))))
2223
for _, e := range farthestFailure {
2324
bb.WriteString(fmt.Sprintf("-> %s\n", e.msg))
2425
}
@@ -27,6 +28,11 @@ func GetFarthestFailure() (string, bool) {
2728
return "", false
2829
}
2930

31+
func showNewline(str string) string {
32+
str = strings.ReplaceAll(str, "\n", "\\n")
33+
return str
34+
}
35+
3036
func pos(c *current) int {
3137
return c.pos.offset + len(c.text)
3238
}
@@ -65,7 +71,7 @@ func (c *current) fatalError(errorMsg string) (bool, error) {
6571
},
6672
}
6773
var bb bytes.Buffer
68-
bb.WriteString(fmt.Sprintf("Parsing error at pos %s and [%d] (after: '%s'):\n", c.pos, pos(c), string(c.text)))
74+
bb.WriteString(fmt.Sprintf("Parsing error at pos %s and [%d] (after: '%s'):\n", c.pos, pos(c), showNewline(string(c.text))))
6975
bb.WriteString(fmt.Sprintf("-> %s\n", errorMsg))
7076
panic(bb.String())
7177
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
filter {
2+
if 1 == 1 {
3+
plugin {}
4+
else {
5+
plugin2 {}
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
filter {
2+
if 1 == 1 {
3+
plugin{}
4+
}

0 commit comments

Comments
 (0)
Please sign in to comment.