Commit Graph

19 Commits

Author SHA1 Message Date
Gérald Barré 10467a2912 Do not register analyzers if SpectreConsole is not available in the current compilation 2023-03-13 20:07:41 -04:00
Gérald Barré a7ab1b690e Use SymbolEqualityComparer.Default when possible 2023-03-13 20:03:12 -04:00
Gérald Barré 142942b8a2 Simplify access to the SemanticModel in analyzers 2023-03-13 19:58:40 -04:00
Gérald Barré 0bab835293 Forward CancellationToken to GetOperation 2023-03-13 19:57:08 -04:00
Gérald Barré 6740f0b02b Add support for static lambda and delegate 2023-02-24 19:04:01 -05:00
Gérald Barré f7f99ec899 Simplify and make the code fix more robust 2023-02-24 19:04:01 -05:00
Gérald Barré 955fe07bac Allow to apply code fix in top-level statements 2023-02-24 19:04:01 -05:00
Cédric Luthi e96a821ead Set the DevelopmentDependency flag on the Spectre.Console.Analyzer project
It was applied by mistake on Spectre.Console in #938.
2022-09-06 19:03:22 +02:00
Patrik Svensson dc93edef15 Remove the 'net50' TFM
Also updates all dependencies to the latest version.

Closes #829
2022-07-02 11:18:34 +02:00
Patrik Svensson 52c1d9122b Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
Patrik Svensson ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
Phil Scott 170901f584 Adds additional check that analyzer is within a method
Resolve #487
2021-07-19 22:31:25 +02:00
Phil Scott fa553fd72e Adds documentation for analyzers 2021-06-25 09:56:20 +02:00
Patrik Svensson a186fd94ac Preserve whitespace trivia when applying code fix 2021-06-23 23:04:37 -04:00
Patrik Svensson c9b178ac96 Moved analyzer tests to its own project
Also moves tests to `./test` which makes it possible
for all test projects to share the same .editorconfig
files and similar.
2021-06-23 22:47:12 +02:00
Phil Scott 721d73e9eb Renames BaseAnalyzer to SpectreAnalyzer 2021-06-23 16:36:48 +02:00
Phil Scott d1048260cc Making the project ready for deployment
Analyzer package needs all the dependencies to be private assets, and it's output pushed to teh analyzers/dotnet/cs folder. 

We don't want anything in the lib folder, so it also disables the auto build output and warnings that there are no files for the target framework in the lib folder
2021-06-23 16:36:48 +02:00
Phil Scott bdcc01ea68 Adding analyzers for common mistakes with live renderables 2021-06-23 16:36:48 +02:00
Phil Scott 4f293d887d Adding analyzer project
Contains two analyzers with fixes

* Use AnsiConsole over System.Console
* Favor local instance over static implementation
2021-06-23 16:36:48 +02:00