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

re-Config-uration #29

Merged
merged 8 commits into from
Dec 30, 2016
Merged

re-Config-uration #29

merged 8 commits into from
Dec 30, 2016

Conversation

muglug
Copy link
Collaborator

@muglug muglug commented Dec 30, 2016

This fixes #26 and #21 by changing how the config works, simplifying it while giving users more flexible ways to progressively check their code.

Now, instead of writing

<issueHandlers>
  <PossiblyUndefinedVariable>
    <includeFiles>
      <directory name="src/Core" />
    </includeFiles>
  </PossiblyUndefinedVariable>
</issueHandlers>

you'll write

<issueHandlers>
  <PossiblyUndefinedVariable errorLevel="suppress">
    <errorLevel type="error">
      <directory name="src/Core" />
    </errorLevel>
  </PossiblyUndefinedVariable>
</issueHandlers>

,
which gives you the ability to gradually introduce warnings in other parts of your codebase e.g.

<issueHandlers>
  <PossiblyUndefinedVariable errorLevel="info">
    <errorLevel type="error">
      <directory name="src/Core" />
    </errorLevel>
    <errorLevel type="suppress">
      <directory name="tests" />
    </errorLevel>
  </PossiblyUndefinedVariable>
</issueHandlers>

This also introduces the ability to hide certain subfolders from Psalm's view in the <projectFiles> config:

<projectFiles>
  <directory name="src" />
  <ignoreFiles>
    <directory name="src/ignoreme" />
  </ignoreFiles>
</projectFiles>

cc @erunion @nickyr

@nickyr
Copy link
Contributor

nickyr commented Dec 30, 2016

New syntax looks great! Will the old syntax just throw an error now?

@muglug
Copy link
Collaborator Author

muglug commented Dec 30, 2016

@nickyr yup - going to add a formal XSD schema shortly

@muglug muglug merged commit 2709198 into master Dec 30, 2016
@muglug muglug deleted the config-nesting branch December 30, 2016 03:49
@erunion
Copy link
Contributor

erunion commented Jan 4, 2017

Dope idea on adding the XSD!

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

Successfully merging this pull request may close these issues.

TypeDoesNotContainType issues with is_numeric() and strings
3 participants