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

Lint for whitespace in tool XML #12246

Merged
merged 3 commits into from Jul 13, 2021

Conversation

neoformit
Copy link
Collaborator

Address issue #12207

Whitespace is quite easily introduced into the tool XML version and name properties through the use of tokens:

<!-- This results in version=" 0.0.1 " -->
<token name="@TOOL_VERSION@"> 0.0.1 </token>

@bernt-matthias suggested it would be better to lint for hazardous whitespace rather than parse it out since there are cases where whitespace may be required in tokens. This PR adds some extra linting to warn users of whitespace in <tool> and <requirement> name/version which might cause errors. An additional test was added to test_tool_xml.py to cover this linting.

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.

License

  • I agree to license these contributions under Galaxy's current license.
  • I agree to allow the Galaxy committers to license these and all my past contributions to the core galaxy codebase under the MIT license.

Cameron Hyde added 2 commits July 12, 2021 15:41
@bernt-matthias
Copy link
Contributor

@neoformit thanks. looks great. can you fix the linter error:

 ./test/unit/tool_util/test_tool_linters.py:4:1: I101 Imported names are in the wrong order. Should be general, inputs

@neoformit
Copy link
Collaborator Author

@bernt-matthias Done :)

Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

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

Fine from my side. Thanks a lot.

@jmchilton jmchilton merged commit fbf6c4d into galaxyproject:dev Jul 13, 2021
@jmchilton
Copy link
Member

Awesome - thanks so much!

@github-actions
Copy link

This PR was merged without a "kind/" label, please correct.

@neoformit neoformit deleted the issue#12207_lint_whitespace branch July 15, 2021 03: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.

None yet

4 participants