-
Notifications
You must be signed in to change notification settings - Fork 78
[WIP] Integration of FSharpLint #1097
[WIP] Integration of FSharpLint #1097
Conversation
needs refactoring to be more f# idiomatic, c# ui was a prototype itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this possible to open ConfigurationManagement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
member __.Name = name?
|
Yep, it tries to save the settings to the solution directory by default (and these settings can be overridden with settings files in project directories for project specific settings) |
|
There's now a dialog that lets the user retry or cancel a save when their save fails. The failing test is now failing with: I'll try to release a new version of the FSharpLint api in line with the latest FSharp.Compiler.Service to fix this |
|
The failing test has been fixed. @vasily-kirichenko Please merge this PR if you think it's ready. |
<?xml version="1.0" encoding="utf-8"?>
<FSharpLintSettings xmlns="https://github.com/fsprojects/FSharpLint/blob/master/ConfigurationSchema.xsd">
<IgnoreFiles Update="Overwrite"><![CDATA[assemblyinfo.*]]></IgnoreFiles>
<Analysers>
<Binding>
<Rules>
<WildcardNamedWithAsPattern>
<Enabled>True</Enabled>
</WildcardNamedWithAsPattern>
</Rules>
</Binding>
<Hints>
<Rules />
<Enabled>False</Enabled>
</Hints>
</Analysers>
</FSharpLintSettings>
<?xml version="1.0" encoding="utf-8"?>
<FSharpLintSettings xmlns="https://github.com/fsprojects/FSharpLint/blob/master/ConfigurationSchema.xsd">
<IgnoreFiles Update="Overwrite"><![CDATA[assemblyinfo.*]]></IgnoreFiles>
<Analysers>
<Binding>
<Rules>
<WildcardNamedWithAsPattern>
<Enabled>False</Enabled>
</WildcardNamedWithAsPattern>
</Rules>
</Binding>
<Hints>
<Rules />
<Enabled>False</Enabled>
</Hints>
</Analysers>
</FSharpLintSettings>Expected behavior: default settings should not be stored in the settings file. |
|
I agree with all your points. I think the solution to finding a setting for a warning will be to introduce identifiers for the lint suggestions The last point is a difficult one, the reason why the default settings are left in a file is in case someone wanted to enforce a default - this would be a rare case where someone could have a default setting changed in a setting file in an ancestor directory. I think as this case is somewhat rare it might be worth not adding default values, and if someone wants that behaviour they can edit the file themselves, what do you think? |
|
OK, I agree about default settings left in the files, let's leave it as it is. About identifiers for suggestions, it'd work, but not that elegant. A good solution would be to add smart tags, which would include something like "switch this rule off for current project / whole solution", but it requires a lot of work. However, if we plan to add quick actions for suggestions, adding one more action into them would be quite easy. |
|
I think adding labels for FSharpLint warnings is a good solution. As a user, I would prefer: than in the setting dialog. The former is easy to understand and look up for further documentation. We can always add smart tags support if we get to it later. |
|
@dungpa 👍 |
|
Great, I'll look at making those UI changes, and adding support to FSharpLint for the rule identifiers |
Hints enabled label when clicked on was not changing the check box
TODO: Handle third state for parent checkbox when some children are selected
Directory paths were missing a trailing backslash, so it would fail when doing `Path.Combine` with root and the file name
|
Thanks for pointing that out - should be sorted now. I was looking at doing the tri-state checkboxes but thinking more about it I don't think it fits perfectly as it's possible for the analysers (the parent checkboxes) to only have a disabled/enabled state in the config file |
[WIP] Integration of FSharpLint
|
Great job, Matt! Thanks a lot both for FsLinter and for this integration. |
|
@duckmatt Thank you for the hard work and patience on this PR. Would you mind to add a short documentation page with screenshots for the feature https://github.com/fsprojects/VisualFSharpPowerTools/tree/master/docs/content ? It's the last thing we hope to finish before releasing VFPT 2.1.0. |
|
Great stuff. Kudos |
|
@dungpa I think we could include the outlining feature as well. |
|
Thanks guys, I'll look at getting a doc page together |






This pull request is to finish up the intgeration of FSharpLint by providing a configuration pane in the power tools options. #1094
The work here so far is mostly to display an existing (default) configuration file in the options. Going forwards I'm looking to integrate it with the configuration management functionality I've been adding to FSharpLint so that any updates made by the user are saved back to disk, and then cleaned up into a state where it can be merged.