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

Only consider files ending with .sol and not starting with ~ in synta… #3751

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

ekpyron
Copy link
Member

@ekpyron ekpyron commented Mar 16, 2018

…x tests.

Fixes #3742.

Are there any other naming schemes for temporary files that will still result in temporary files being considered valid tests?

@ekpyron ekpyron self-assigned this Mar 16, 2018
@ekpyron ekpyron requested a review from chriseth March 16, 2018 10:46
@ekpyron ekpyron force-pushed the syntaxTestsExtensions branch from 8395da9 to df39015 Compare March 16, 2018 10:52
Copy link
Contributor

@chriseth chriseth left a comment

Choose a reason for hiding this comment

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

Please reduce code duplication.

@@ -220,7 +220,12 @@ int SyntaxTest::registerTests(
fs::directory_iterator(fullpath),
fs::directory_iterator()
))
numTestsAdded += registerTests(*sub_suite, _basepath, _path / entry.path().filename());
if (
Copy link
Contributor

Choose a reason for hiding this comment

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

Please format as

if (fs::is_directory(entry.path()) || (
    ... &&
))
``

if (
fs::is_directory(entry.path()) ||
(entry.path().extension().string() == ".sol" &&
!boost::starts_with(entry.path().filename().string(), "~"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I thought about excluding files that start with ..

@ekpyron ekpyron force-pushed the syntaxTestsExtensions branch from df39015 to e68c19c Compare March 16, 2018 11:28
@ekpyron
Copy link
Member Author

ekpyron commented Mar 16, 2018

@chriseth Requested changes done: moved filename filter to a static function in SyntaxTest; also filter files starting with ".". Code formatting request becomes obsolete.

@chriseth chriseth merged commit 2b2527f into develop Mar 16, 2018
@axic axic deleted the syntaxTestsExtensions branch March 21, 2018 18:06
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.

2 participants