├── .github └── workflows │ └── github-actions-pull-request.yml ├── .gitignore ├── .merlin ├── LICENSE ├── Makefile ├── README.rst ├── descr ├── docs ├── Makefile ├── basics.rst ├── changelog.rst ├── components │ ├── index.rst │ ├── providers.rst │ └── reporters.rst ├── conf.py ├── configuration.rst ├── developing.rst ├── imgs │ └── neal_diagram.png ├── index.rst ├── reference.rst ├── rules.rst └── testing_rules.rst ├── examples └── swift │ ├── ApplicationConfig.rules │ ├── General.rules │ └── LibraryConfig.rules ├── src ├── Makefile ├── Makefile.build ├── Makefile.consts ├── Makefile.propagate ├── core │ ├── Makefile │ ├── _tags │ ├── directives │ │ ├── _tags │ │ ├── directive.ml │ │ ├── skip.ml │ │ ├── skip_absyn.ml │ │ ├── skip_lexer.mll │ │ ├── skip_parser.mly │ │ └── swiftlint.ml │ ├── driver │ │ ├── _tags │ │ ├── builtin_functions.ml │ │ ├── config.ml │ │ ├── driver.ml │ │ ├── evaluator.ml │ │ ├── evaluator.mli │ │ ├── fs.ml │ │ ├── loader.ml │ │ ├── matcher.ml │ │ ├── matcher.mli │ │ ├── pipeline.ml │ │ ├── resolver.ml │ │ ├── stats.ml │ │ └── utils.ml │ ├── main.ml │ ├── myocamlbuild.ml │ ├── neal.ml │ ├── provider │ │ ├── _tags │ │ └── prabsyn.ml │ └── rule │ │ ├── Makefile │ │ ├── _tags │ │ ├── main.ml │ │ ├── rule_lexer.mll │ │ ├── rule_loader.ml │ │ ├── rule_loader.mli │ │ ├── rule_parser.mly │ │ ├── rule_printer.ml │ │ └── rule_tester.ml ├── myocamlbuild.ml ├── neal.install ├── opam │ ├── META │ └── opam ├── providers │ ├── Makefile │ ├── helpers │ │ ├── ast2json.py │ │ └── dump_python_ast.py │ ├── python │ │ ├── Makefile │ │ ├── _tags │ │ ├── myocamlbuild.ml │ │ └── python.ml │ └── swift │ │ ├── Makefile │ │ ├── _tags │ │ ├── myocamlbuild.ml │ │ ├── opam │ │ ├── META │ │ └── opam │ │ ├── parsing │ │ ├── combinators.ml │ │ └── parser.ml │ │ ├── swift.mldylib │ │ ├── swift.mlpack │ │ └── swift_provider.ml └── reporters │ ├── Makefile │ ├── cli │ ├── Makefile │ ├── _tags │ ├── cli.mldylib │ ├── cli.mlpack │ ├── cli_reporter.ml │ ├── loc.ml │ ├── myocamlbuild.ml │ └── opam │ └── compact │ ├── Makefile │ ├── _tags │ ├── compact.mldylib │ ├── compact.mlpack │ ├── compact_reporter.ml │ ├── loc.ml │ └── myocamlbuild.ml └── tests ├── .flake8 ├── .gitignore ├── Makefile ├── integration ├── input │ ├── error.swift │ ├── filelist.test │ ├── glob │ │ ├── BUCK │ │ ├── bar.swift │ │ ├── bar_fail.swift │ │ ├── bar_fail2.swift │ │ ├── foo.swift │ │ ├── lit.local.cfg │ │ ├── neal.json │ │ └── test.test │ ├── ignore.swift │ ├── parse_error.swift │ ├── src │ │ ├── bar │ │ │ ├── neal.json │ │ │ └── test.swift │ │ ├── foo │ │ │ ├── neal.json │ │ │ ├── test.swift │ │ │ └── test_fail.swift │ │ ├── lit.local.cfg │ │ └── src.test │ ├── swiftlint-1.swift │ ├── swiftlint-2.swift │ └── warning.swift ├── lit.local.cfg ├── optional_rules │ ├── buck.rules │ ├── test_bar.rules │ └── test_foo.rules └── rules │ └── test.rules ├── lit.cfg ├── matchers ├── input │ └── test.swift ├── lit.local.cfg └── rules │ └── test.rules ├── python ├── input │ └── foo.py ├── lit.local.cfg └── rules │ └── test.rules ├── requirements.txt ├── rule_import ├── fixtures │ ├── helper.rules │ ├── lit.local.cfg │ └── test.swift ├── input │ ├── base.rules │ ├── cycle.rules │ ├── import_all.rules │ ├── import_one.rules │ └── test_with_import.rules └── lit.local.cfg ├── rule_testing ├── fixtures │ ├── forced_value.swift │ ├── syntax_error.swift │ └── visibility_private.python ├── input │ ├── python.rules │ └── swift.rules └── lit.local.cfg ├── swift ├── input │ ├── comments.swift │ ├── prop_access.swift │ ├── test1.swift │ ├── test2.swift │ ├── test3.swift │ ├── test4.swift │ ├── test5.swift │ └── test6.swift ├── lit.local.cfg └── rules │ └── rules.rules └── swift_parser ├── invalid ├── operators1.swift ├── operators2.swift ├── operators3.swift └── operators4.swift ├── lit.local.cfg └── valid ├── async_functions.swift ├── double_optional.swift ├── function.swift ├── identifiers.swift ├── keypath.swift ├── multiline_strings.swift ├── operators.swift ├── swift_concurrency.swift ├── switch.swift └── whitespace.swift /.github/workflows/github-actions-pull-request.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/.github/workflows/github-actions-pull-request.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/.gitignore -------------------------------------------------------------------------------- /.merlin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/.merlin -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/Makefile -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | docs/index.rst -------------------------------------------------------------------------------- /descr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/descr -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/Makefile -------------------------------------------------------------------------------- /docs/basics.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/basics.rst -------------------------------------------------------------------------------- /docs/changelog.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/changelog.rst -------------------------------------------------------------------------------- /docs/components/index.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/components/index.rst -------------------------------------------------------------------------------- /docs/components/providers.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/components/providers.rst -------------------------------------------------------------------------------- /docs/components/reporters.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/components/reporters.rst -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/conf.py -------------------------------------------------------------------------------- /docs/configuration.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/configuration.rst -------------------------------------------------------------------------------- /docs/developing.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/developing.rst -------------------------------------------------------------------------------- /docs/imgs/neal_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/imgs/neal_diagram.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/index.rst -------------------------------------------------------------------------------- /docs/reference.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/reference.rst -------------------------------------------------------------------------------- /docs/rules.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/rules.rst -------------------------------------------------------------------------------- /docs/testing_rules.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/docs/testing_rules.rst -------------------------------------------------------------------------------- /examples/swift/ApplicationConfig.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/examples/swift/ApplicationConfig.rules -------------------------------------------------------------------------------- /examples/swift/General.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/examples/swift/General.rules -------------------------------------------------------------------------------- /examples/swift/LibraryConfig.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/examples/swift/LibraryConfig.rules -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/Makefile -------------------------------------------------------------------------------- /src/Makefile.build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/Makefile.build -------------------------------------------------------------------------------- /src/Makefile.consts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/Makefile.consts -------------------------------------------------------------------------------- /src/Makefile.propagate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/Makefile.propagate -------------------------------------------------------------------------------- /src/core/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/Makefile -------------------------------------------------------------------------------- /src/core/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/_tags -------------------------------------------------------------------------------- /src/core/directives/_tags: -------------------------------------------------------------------------------- 1 | true: use_menhir, explain 2 | -------------------------------------------------------------------------------- /src/core/directives/directive.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/directive.ml -------------------------------------------------------------------------------- /src/core/directives/skip.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/skip.ml -------------------------------------------------------------------------------- /src/core/directives/skip_absyn.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/skip_absyn.ml -------------------------------------------------------------------------------- /src/core/directives/skip_lexer.mll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/skip_lexer.mll -------------------------------------------------------------------------------- /src/core/directives/skip_parser.mly: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/skip_parser.mly -------------------------------------------------------------------------------- /src/core/directives/swiftlint.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/directives/swiftlint.ml -------------------------------------------------------------------------------- /src/core/driver/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/_tags -------------------------------------------------------------------------------- /src/core/driver/builtin_functions.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/builtin_functions.ml -------------------------------------------------------------------------------- /src/core/driver/config.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/config.ml -------------------------------------------------------------------------------- /src/core/driver/driver.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/driver.ml -------------------------------------------------------------------------------- /src/core/driver/evaluator.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/evaluator.ml -------------------------------------------------------------------------------- /src/core/driver/evaluator.mli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/evaluator.mli -------------------------------------------------------------------------------- /src/core/driver/fs.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/fs.ml -------------------------------------------------------------------------------- /src/core/driver/loader.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/loader.ml -------------------------------------------------------------------------------- /src/core/driver/matcher.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/matcher.ml -------------------------------------------------------------------------------- /src/core/driver/matcher.mli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/matcher.mli -------------------------------------------------------------------------------- /src/core/driver/pipeline.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/pipeline.ml -------------------------------------------------------------------------------- /src/core/driver/resolver.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/resolver.ml -------------------------------------------------------------------------------- /src/core/driver/stats.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/stats.ml -------------------------------------------------------------------------------- /src/core/driver/utils.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/driver/utils.ml -------------------------------------------------------------------------------- /src/core/main.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/main.ml -------------------------------------------------------------------------------- /src/core/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/myocamlbuild.ml -------------------------------------------------------------------------------- /src/core/neal.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/neal.ml -------------------------------------------------------------------------------- /src/core/provider/_tags: -------------------------------------------------------------------------------- 1 | "prabsyn.ml": package(yojson) 2 | -------------------------------------------------------------------------------- /src/core/provider/prabsyn.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/provider/prabsyn.ml -------------------------------------------------------------------------------- /src/core/rule/Makefile: -------------------------------------------------------------------------------- 1 | MAIN_FILE = main 2 | 3 | include ../../Makefile.build 4 | -------------------------------------------------------------------------------- /src/core/rule/_tags: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/core/rule/main.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/main.ml -------------------------------------------------------------------------------- /src/core/rule/rule_lexer.mll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_lexer.mll -------------------------------------------------------------------------------- /src/core/rule/rule_loader.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_loader.ml -------------------------------------------------------------------------------- /src/core/rule/rule_loader.mli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_loader.mli -------------------------------------------------------------------------------- /src/core/rule/rule_parser.mly: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_parser.mly -------------------------------------------------------------------------------- /src/core/rule/rule_printer.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_printer.ml -------------------------------------------------------------------------------- /src/core/rule/rule_tester.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/core/rule/rule_tester.ml -------------------------------------------------------------------------------- /src/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/myocamlbuild.ml -------------------------------------------------------------------------------- /src/neal.install: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/neal.install -------------------------------------------------------------------------------- /src/opam/META: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/opam/META -------------------------------------------------------------------------------- /src/opam/opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/opam/opam -------------------------------------------------------------------------------- /src/providers/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.propagate 2 | -------------------------------------------------------------------------------- /src/providers/helpers/ast2json.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/helpers/ast2json.py -------------------------------------------------------------------------------- /src/providers/helpers/dump_python_ast.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/helpers/dump_python_ast.py -------------------------------------------------------------------------------- /src/providers/python/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/python/Makefile -------------------------------------------------------------------------------- /src/providers/python/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/python/_tags -------------------------------------------------------------------------------- /src/providers/python/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/python/myocamlbuild.ml -------------------------------------------------------------------------------- /src/providers/python/python.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/python/python.ml -------------------------------------------------------------------------------- /src/providers/swift/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/Makefile -------------------------------------------------------------------------------- /src/providers/swift/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/_tags -------------------------------------------------------------------------------- /src/providers/swift/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/myocamlbuild.ml -------------------------------------------------------------------------------- /src/providers/swift/opam/META: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/opam/META -------------------------------------------------------------------------------- /src/providers/swift/opam/opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/opam/opam -------------------------------------------------------------------------------- /src/providers/swift/parsing/combinators.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/parsing/combinators.ml -------------------------------------------------------------------------------- /src/providers/swift/parsing/parser.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/parsing/parser.ml -------------------------------------------------------------------------------- /src/providers/swift/swift.mldylib: -------------------------------------------------------------------------------- 1 | Swift_provider 2 | Combinators 3 | Parser 4 | -------------------------------------------------------------------------------- /src/providers/swift/swift.mlpack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/swift.mlpack -------------------------------------------------------------------------------- /src/providers/swift/swift_provider.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/providers/swift/swift_provider.ml -------------------------------------------------------------------------------- /src/reporters/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.propagate 2 | -------------------------------------------------------------------------------- /src/reporters/cli/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/Makefile -------------------------------------------------------------------------------- /src/reporters/cli/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/_tags -------------------------------------------------------------------------------- /src/reporters/cli/cli.mldylib: -------------------------------------------------------------------------------- 1 | Cli_reporter 2 | Loc 3 | -------------------------------------------------------------------------------- /src/reporters/cli/cli.mlpack: -------------------------------------------------------------------------------- 1 | Cli_reporter 2 | Loc 3 | -------------------------------------------------------------------------------- /src/reporters/cli/cli_reporter.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/cli_reporter.ml -------------------------------------------------------------------------------- /src/reporters/cli/loc.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/loc.ml -------------------------------------------------------------------------------- /src/reporters/cli/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/myocamlbuild.ml -------------------------------------------------------------------------------- /src/reporters/cli/opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/cli/opam -------------------------------------------------------------------------------- /src/reporters/compact/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/compact/Makefile -------------------------------------------------------------------------------- /src/reporters/compact/_tags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/compact/_tags -------------------------------------------------------------------------------- /src/reporters/compact/compact.mldylib: -------------------------------------------------------------------------------- 1 | Compact_reporter 2 | Loc 3 | -------------------------------------------------------------------------------- /src/reporters/compact/compact.mlpack: -------------------------------------------------------------------------------- 1 | Compact_reporter 2 | Loc 3 | -------------------------------------------------------------------------------- /src/reporters/compact/compact_reporter.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/compact/compact_reporter.ml -------------------------------------------------------------------------------- /src/reporters/compact/loc.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/compact/loc.ml -------------------------------------------------------------------------------- /src/reporters/compact/myocamlbuild.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/src/reporters/compact/myocamlbuild.ml -------------------------------------------------------------------------------- /tests/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | builtins=config 3 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | **/actual/ 2 | **/Output/ 3 | -------------------------------------------------------------------------------- /tests/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/Makefile -------------------------------------------------------------------------------- /tests/integration/input/error.swift: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal %args | %check 2 | 3 | x! // CHECK-L: error: No force unwrap 4 | -------------------------------------------------------------------------------- /tests/integration/input/filelist.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/filelist.test -------------------------------------------------------------------------------- /tests/integration/input/glob/BUCK: -------------------------------------------------------------------------------- 1 | apple_library( 2 | visibility=['PUBLIC'] 3 | ) 4 | -------------------------------------------------------------------------------- /tests/integration/input/glob/bar.swift: -------------------------------------------------------------------------------- 1 | bar() 2 | -------------------------------------------------------------------------------- /tests/integration/input/glob/bar_fail.swift: -------------------------------------------------------------------------------- 1 | foo() 2 | -------------------------------------------------------------------------------- /tests/integration/input/glob/bar_fail2.swift: -------------------------------------------------------------------------------- 1 | foo() 2 | -------------------------------------------------------------------------------- /tests/integration/input/glob/foo.swift: -------------------------------------------------------------------------------- 1 | foo() 2 | -------------------------------------------------------------------------------- /tests/integration/input/glob/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.test'] 4 | -------------------------------------------------------------------------------- /tests/integration/input/glob/neal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/glob/neal.json -------------------------------------------------------------------------------- /tests/integration/input/glob/test.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/glob/test.test -------------------------------------------------------------------------------- /tests/integration/input/ignore.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/ignore.swift -------------------------------------------------------------------------------- /tests/integration/input/parse_error.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/parse_error.swift -------------------------------------------------------------------------------- /tests/integration/input/src/bar/neal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/src/bar/neal.json -------------------------------------------------------------------------------- /tests/integration/input/src/bar/test.swift: -------------------------------------------------------------------------------- 1 | bar() 2 | -------------------------------------------------------------------------------- /tests/integration/input/src/foo/neal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/src/foo/neal.json -------------------------------------------------------------------------------- /tests/integration/input/src/foo/test.swift: -------------------------------------------------------------------------------- 1 | foo() 2 | -------------------------------------------------------------------------------- /tests/integration/input/src/foo/test_fail.swift: -------------------------------------------------------------------------------- 1 | bar() 2 | -------------------------------------------------------------------------------- /tests/integration/input/src/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.test'] 4 | -------------------------------------------------------------------------------- /tests/integration/input/src/src.test: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal %p | %check 2 | 3 | // CHECK: error: Call foo instead 4 | -------------------------------------------------------------------------------- /tests/integration/input/swiftlint-1.swift: -------------------------------------------------------------------------------- 1 | // RUN: %neal %args 2 | 3 | // swiftlint:disable custom_rules 4 | 5 | print("") 6 | x! 7 | -------------------------------------------------------------------------------- /tests/integration/input/swiftlint-2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/swiftlint-2.swift -------------------------------------------------------------------------------- /tests/integration/input/warning.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/input/warning.swift -------------------------------------------------------------------------------- /tests/integration/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.swift', '.test'] 4 | -------------------------------------------------------------------------------- /tests/integration/optional_rules/buck.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/optional_rules/buck.rules -------------------------------------------------------------------------------- /tests/integration/optional_rules/test_bar.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/optional_rules/test_bar.rules -------------------------------------------------------------------------------- /tests/integration/optional_rules/test_foo.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/optional_rules/test_foo.rules -------------------------------------------------------------------------------- /tests/integration/rules/test.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/integration/rules/test.rules -------------------------------------------------------------------------------- /tests/lit.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/lit.cfg -------------------------------------------------------------------------------- /tests/matchers/input/test.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/matchers/input/test.swift -------------------------------------------------------------------------------- /tests/matchers/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.swift'] 4 | -------------------------------------------------------------------------------- /tests/matchers/rules/test.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/matchers/rules/test.rules -------------------------------------------------------------------------------- /tests/python/input/foo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/python/input/foo.py -------------------------------------------------------------------------------- /tests/python/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.py'] 4 | -------------------------------------------------------------------------------- /tests/python/rules/test.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/python/rules/test.rules -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | lit==0.5.0 2 | OutputCheck==0.4.1 3 | -------------------------------------------------------------------------------- /tests/rule_import/fixtures/helper.rules: -------------------------------------------------------------------------------- 1 | import * from "../input/cycle.rules" 2 | -------------------------------------------------------------------------------- /tests/rule_import/fixtures/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = [] 4 | -------------------------------------------------------------------------------- /tests/rule_import/fixtures/test.swift: -------------------------------------------------------------------------------- 1 | arc4random() 2 | x! 3 | -------------------------------------------------------------------------------- /tests/rule_import/input/base.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/input/base.rules -------------------------------------------------------------------------------- /tests/rule_import/input/cycle.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/input/cycle.rules -------------------------------------------------------------------------------- /tests/rule_import/input/import_all.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/input/import_all.rules -------------------------------------------------------------------------------- /tests/rule_import/input/import_one.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/input/import_one.rules -------------------------------------------------------------------------------- /tests/rule_import/input/test_with_import.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/input/test_with_import.rules -------------------------------------------------------------------------------- /tests/rule_import/lit.local.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_import/lit.local.cfg -------------------------------------------------------------------------------- /tests/rule_testing/fixtures/forced_value.swift: -------------------------------------------------------------------------------- 1 | x! 2 | -------------------------------------------------------------------------------- /tests/rule_testing/fixtures/syntax_error.swift: -------------------------------------------------------------------------------- 1 | 10x 2 | -------------------------------------------------------------------------------- /tests/rule_testing/fixtures/visibility_private.python: -------------------------------------------------------------------------------- 1 | foo(visibility=['PRIVATE']) 2 | -------------------------------------------------------------------------------- /tests/rule_testing/input/python.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_testing/input/python.rules -------------------------------------------------------------------------------- /tests/rule_testing/input/swift.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/rule_testing/input/swift.rules -------------------------------------------------------------------------------- /tests/rule_testing/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = [ '.rules' ] 4 | -------------------------------------------------------------------------------- /tests/swift/input/comments.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/comments.swift -------------------------------------------------------------------------------- /tests/swift/input/prop_access.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/prop_access.swift -------------------------------------------------------------------------------- /tests/swift/input/test1.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test1.swift -------------------------------------------------------------------------------- /tests/swift/input/test2.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test2.swift -------------------------------------------------------------------------------- /tests/swift/input/test3.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test3.swift -------------------------------------------------------------------------------- /tests/swift/input/test4.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test4.swift -------------------------------------------------------------------------------- /tests/swift/input/test5.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test5.swift -------------------------------------------------------------------------------- /tests/swift/input/test6.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/input/test6.swift -------------------------------------------------------------------------------- /tests/swift/lit.local.cfg: -------------------------------------------------------------------------------- 1 | # vi: ft=python 2 | 3 | config.suffixes = ['.swift'] 4 | -------------------------------------------------------------------------------- /tests/swift/rules/rules.rules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift/rules/rules.rules -------------------------------------------------------------------------------- /tests/swift_parser/invalid/operators1.swift: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal-swift 2 | 3 | /* fails due to 2 statements in 1 line */ 4 | a +++b; 5 | -------------------------------------------------------------------------------- /tests/swift_parser/invalid/operators2.swift: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal-swift 2 | 3 | /* fails due to 2 statements in 1 line */ 4 | a+++ b; 5 | -------------------------------------------------------------------------------- /tests/swift_parser/invalid/operators3.swift: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal-swift 2 | 3 | /* fails due to 2 statements in 1 line */ 4 | (a+++)b; 5 | -------------------------------------------------------------------------------- /tests/swift_parser/invalid/operators4.swift: -------------------------------------------------------------------------------- 1 | // RUN: %not %neal-swift 2 | 3 | /*invalid optional chaining*/ 4 | a ?.b 5 | -------------------------------------------------------------------------------- /tests/swift_parser/lit.local.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/lit.local.cfg -------------------------------------------------------------------------------- /tests/swift_parser/valid/async_functions.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/async_functions.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/double_optional.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/double_optional.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/function.swift: -------------------------------------------------------------------------------- 1 | // RUN: %neal-swift 2 | 3 | func f() -> 4 | (Int, String) 5 | { 6 | (1, "") 7 | } 8 | -------------------------------------------------------------------------------- /tests/swift_parser/valid/identifiers.swift: -------------------------------------------------------------------------------- 1 | // RUN: %neal-swift 2 | 3 | _0.getFixture() 4 | -------------------------------------------------------------------------------- /tests/swift_parser/valid/keypath.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/keypath.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/multiline_strings.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/multiline_strings.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/operators.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/operators.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/swift_concurrency.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/swift_concurrency.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/switch.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/switch.swift -------------------------------------------------------------------------------- /tests/swift_parser/valid/whitespace.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uber/NEAL/HEAD/tests/swift_parser/valid/whitespace.swift --------------------------------------------------------------------------------