Skip to content

Commit

Permalink
Adjust lint config to tolerate malordered imports in antlr generated …
Browse files Browse the repository at this point in the history
…files.
  • Loading branch information
jiceatscion committed Oct 4, 2024
1 parent 8abbb6b commit e11e615
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion antlr/sequence/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ load("@apple_rules_lint//lint:defs.bzl", "package_lint_config")
go_lint_config(
name = "go_lint_config",
exclude_filter = [
"sequence_parser.go",
"_parser.go",
"_lexer.go",
],
visibility = [
"//visibility:public",
Expand Down
3 changes: 1 addition & 2 deletions antlr/sequence/sequence_lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ package sequence

import (
"fmt"
"github.com/antlr4-go/antlr/v4"
"sync"
"unicode"

"github.com/antlr4-go/antlr/v4"
)

// Suppress unused import error
Expand Down
16 changes: 16 additions & 0 deletions antlr/traffic_class/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
load("//tools/lint:go.bzl", "go_library")
load("//tools/lint:go_config.bzl", "go_lint_config")
load("@apple_rules_lint//lint:defs.bzl", "package_lint_config")

go_lint_config(
name = "go_lint_config",
exclude_filter = [
"_lexer.go",
],
visibility = [
"//visibility:public",
],
)

package_lint_config({
"go": ":go_lint_config",
})

go_library(
name = "go_default_library",
Expand Down
3 changes: 1 addition & 2 deletions antlr/traffic_class/trafficclass_lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ package traffic_class

import (
"fmt"
"github.com/antlr4-go/antlr/v4"
"sync"
"unicode"

"github.com/antlr4-go/antlr/v4"
)

// Suppress unused import error
Expand Down

0 comments on commit e11e615

Please sign in to comment.