Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more hints instead of overriding in settings file #229

Closed
Krzysztof-Cieslak opened this issue Jul 1, 2017 · 2 comments
Closed

Adding more hints instead of overriding in settings file #229

Krzysztof-Cieslak opened this issue Jul 1, 2017 · 2 comments

Comments

@Krzysztof-Cieslak
Copy link
Member

Right now setting Hints entry in configuration file override default settings. In many cases I don't want to override hints, I just want to add few other entries. To do so I need to come here, copy all default hints, and put them in my custom config file. Instead I'd like to do something like:

        <Hints>
            <Hints>
              <![CDATA[
                %INCLUDE_DEFAULT_HINTS%
                Option.get x ===> m"Consider using pattern matching - this function is partial and can throw exception"
                List.head x ===> m"Consider using `List.tryHead` and pattern matching - this function is partial and can throw exception"
                List.find f x ===> m"Consider using `List.tryFind` and pattern matching - this function is partial and can throw exception"
              ]]>
            </Hints>
            <Enabled>true</Enabled>
        </Hints>
@Krzysztof-Cieslak
Copy link
Member Author

Fixed by #230

@duckmatt
Copy link
Collaborator

duckmatt commented Jul 2, 2017

Thanks for the suggestion, this will now be the default behaviour.

Old behaviour of overwriting can be done via an update attribute on the Hints node:

    <Hints>
        <Hints Update="Overwrite">
          <![CDATA[
            Option.get x ===> m"Consider using pattern matching - this function is partial and can throw exception"
            List.head x ===> m"Consider using `List.tryHead` and pattern matching - this function is partial and can throw exception"
            List.find f x ===> m"Consider using `List.tryFind` and pattern matching - this function is partial and can throw exception"
          ]]>
        </Hints>
        <Enabled>true</Enabled>
    </Hints>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants