Skip to content

Add tests for warnings & fix some warnings#2137

Merged
garyb merged 1 commit intopurescript:0.9from
garyb:warnings-tests
May 20, 2016
Merged

Add tests for warnings & fix some warnings#2137
garyb merged 1 commit intopurescript:0.9from
garyb:warnings-tests

Conversation

@garyb
Copy link
Copy Markdown
Member

@garyb garyb commented May 17, 2016

This isn't a comprehensive test suite for the warnings, but I think it's the majority of them. The main one that I know for sure needs covering is the ShadowedName stuff.

I removed the RedundantEmptyHidingImport check, as it wasn't working, and you'd have to work really hard for that case to arise now anyway, thanks to the unused import warnings. The only way it can happen is if you import a module, hiding everything, and are re-exporting that module from the current module.

The fixes I speak of are things that I inadvertently broke during #2090 - had an unless' function that was actually when', ran the import linter on the wrong version of a module, etc.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.7%) to 56.605% when pulling 81734f1 on garyb:warnings-tests into 4852b5d on purescript:0.9.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.7%) to 56.605% when pulling 99b7fa8 on garyb:warnings-tests into 4852b5d on purescript:0.9.

@garyb garyb force-pushed the warnings-tests branch from 99b7fa8 to 3a4d3b1 Compare May 17, 2016 11:07
@garyb
Copy link
Copy Markdown
Member Author

garyb commented May 17, 2016

Fixed the extra-source-files again.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.7%) to 56.605% when pulling 3a4d3b1 on garyb:warnings-tests into 4852b5d on purescript:0.9.

@@ -0,0 +1,5 @@
-- @shouldWarnWith ShadowedTypeVar
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just in a separate directory so that it doesn't break the build?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is something I discovered that I figure should warn, but we currently don't catch. I made the warning detection like the errors: it expect an exact set of warnings, so yeah, it would break the tests currently.

Perhaps I should just open an issue instead and delete this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening an issue instead sounds sensible to me, yeah.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened as #2140 instead.

@garyb garyb force-pushed the warnings-tests branch from 3a4d3b1 to 8a6bf01 Compare May 18, 2016 15:27
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.7%) to 56.605% when pulling 8a6bf01 on garyb:warnings-tests into 4852b5d on purescript:0.9.

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented May 20, 2016

LGTM, thanks!

@garyb garyb merged commit 831b23a into purescript:0.9 May 20, 2016
@garyb garyb deleted the warnings-tests branch May 20, 2016 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants