File tree Expand file tree Collapse file tree
tests/FSharpLint.Console.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,30 @@ type TestConsoleApplication() =
118118
119119 Assert.AreEqual( int ExitCode.Failure, returnCode)
120120 Assert.AreEqual( set [ " Use prefix syntax for generic type." ], errors)
121+
122+ /// Regression for bug discovered during: https://github.com/fsprojects/FSharpLint/issues/466
123+ /// Adding a rule to the config was disabling other rules unless they're explicitly specified.
124+ [<Test>]
125+ member __. ``Adding a rule to a custom config should not have side effects on other rules ( from the default config ). ``() =
126+ let config = """
127+ {
128+ "exceptionNames": {
129+ "enabled": false
130+ }
131+ }
132+ """
133+ use configFile = new TemporaryFile( config, " json" )
134+
135+ let input = """
136+ type Signature =
137+ abstract member Encoded : string
138+ abstract member PathName : string
139+ """
140+
141+ let ( returnCode , errors ) = main [| " lint" ; " --lint-config" ; configFile.FileName; input |]
142+
143+ Assert.AreEqual(- 1 , returnCode)
144+ Assert.AreEqual( set [ " Consider changing `Signature` to be prefixed with `I`." ], errors)
121145
122146[<TestFixture>]
123147type TestFileTypeInference () =
You can’t perform that action at this time.
0 commit comments