-
Notifications
You must be signed in to change notification settings - Fork 580
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
Fix pmd bears on Windows #2942
Merged
Merged
Fix pmd bears on Windows #2942
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note there is now another error, with phpmd. #2943 |
jayvdb
commented
Aug 4, 2019
bears/general/CPDBear.py
Outdated
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
LICENSE = 'AGPL-3.0' | ||
CAN_DETECT = {'Duplication'} | ||
|
||
@classmethod | ||
def check_prerequisites(cls): | ||
if which('bash') is None: | ||
return 'bash is not installed.' | ||
if which('pmd') is None and which('run.sh') is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while the error message isnt as good, the AnyOneOfRequirements
above does the same thing.
And removing the 'bash'
prefix should be enough to make pmd work on Windows.
jayvdb
force-pushed
the
win-disable-pmd
branch
3 times, most recently
from
August 5, 2019 09:09
b710ded
to
4d74a61
Compare
lxml 4.4.0 dropped support for Python 3.4. Hence, the version is capped below 4.4.0. Closes coala#2940
Custom rules in tox.ini are migrated into get_tests.py so that they can be documented and dynamically collated together. Related to coala#1476
Disable PHPMessDetectorBearTest test test_cleancode_violation, as it is currently failing due to a minor text change in the error emitted by the linter. Related to coala#2943
XMLBearDTDUrlTest.test_valid_files is consistently failing only on Travis Windows, but not AppVeyor. Related to coala#2944
Avoid including paths from executable dependencies, and sync with package_manager adding new distribution class 'pkg'.
Describe current executable requirements of cpd or run.sh, replacing check_prerequisites with Requirement classes. Also remove explicit invocation using `bash`, which was ineffective as which('run.sh') would only be successful if the script was executable, and the run.sh script is not written to be compatible with invocation on Windows. This de-supports any usage where `pmd` existed and was a script which could invoke `cpd`. It fixes usage where `pmd` is not a script, like it is an executable shim when installed with choco. Also remove duplication of `CPDBear` in generate_bear_metadata.py which was intended to make 'cpd' deselectable, but was broken. It is now mostly unnecessary as the ExecutableRequirement classes provide the `cpd` tag, however the `java` tag is still manual. Reduce the required coverage percentage to 98%. Fixes coala#2937 Related to coala#2908
Describe current executable requirements of pmd or run.sh. Also remove explicit invocation using `bash`, which was ineffective as which('run.sh') would only be successful if the script was executable. Also add `-f text` arguments, which are mandatory on recent versions of pmd, but were optional on older supported versions. Fixes coala#2908
The unix pmd installer only creates an executable run.sh
Choco package pmd now works on Windows, but disable its dependency on jre8. Closes coala#2908 Related to coala#651
XMLBearDTDUrlTest times out regular on Travis Windows. Increase the timeout for that test to 120s. Related to coala#2944
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Checklist
them.
individually. It is not sufficient to have "fixup commits" on your PR,
our bot will still report the issues for the previous commit.) You will
likely receive a lot of bot comments and build failures if coala does not
pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.
Please consider helping us by reviewing other peoples pull requests as well:
corobo mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!