Skip to content

Fix bugs in check functions #96

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

Merged
merged 10 commits into from
Dec 11, 2020
Merged

Fix bugs in check functions #96

merged 10 commits into from
Dec 11, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 10, 2020

No description provided.

Previously, the check level was being used rather than the check result, meaning the failure message wasn't shown when
the check failed but the configuration resulted it being a warning.
Previously, the check was failing for any pattern validation failure, causing it to overlap with other checks.
Three identical tests were being run for the permissive compliance level when the intent was to run one for each level.
The regular expression was only intended to check for prohibited characters, but it was inadvertently enforcing a
minimum length of 1, which was also inherited by the name property schema (which already has a separate minimum length
schema). There is currently no plans to add a minimum length requirement for the depends field, and if that is desired,
it is better accomplished via the "minLength" schema.
Although the library specification says "Version should be semver compliant", it also says "1.2 is accepted", so
relaxed semver is specification-compliant.
For some reason, this specific sentence results in a non-nil diff of lenght > 0. The previous approach of checking if
the diff was nil resulted in a false positive, which is avoided by basing the check on the length of the diff.
The checks for library.properties field formatting are skipped if the field is not present, but that was not possible
with the required fields, since that is exactly what is being checked. So the checks should only be skipped if there is
no library.properties at all.
@per1234 per1234 merged commit 63844cd into main Dec 11, 2020
@per1234 per1234 deleted the per1234/fix-checks branch December 11, 2020 23:26
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants