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

Add: plugin for finding excess space before dot in some tags #751

Merged
merged 9 commits into from
Oct 1, 2024

Conversation

NiklasHargarter
Copy link
Contributor

@NiklasHargarter NiklasHargarter commented Sep 9, 2024

What

Adds a plugin to check script_tags that use full sentences in their value for excess white spaces before sentence terminating dots.
fix method is implemented to automatically remove the preceding excess white spaces.

21.04 and 22.04 are ignored because they are generated.
Other entries in the ignore list use whitespace in various ways that have excess whitespace before dots, but on purpose, as used for beginning entries in an enumeration.

Why

References

Jira VTOPS-229

Checklist

  • Tests

currently finds 121 occurrences in VT repo,

@NiklasHargarter NiklasHargarter requested a review from a team as a code owner September 9, 2024 13:02
Copy link

github-actions bot commented Sep 9, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 03b6dab.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link

github-actions bot commented Sep 9, 2024

Conventional Commits Report

Type Number
Changed 6
Added 3

🚀 Conventional commits found.

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.79%. Comparing base (a4ec3b3) to head (03b6dab).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
troubadix/plugins/spaces_before_dots.py 94.87% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #751      +/-   ##
==========================================
+ Coverage   79.59%   79.79%   +0.20%     
==========================================
  Files          86       87       +1     
  Lines        2935     2974      +39     
  Branches      632      639       +7     
==========================================
+ Hits         2336     2373      +37     
- Misses        453      454       +1     
- Partials      146      147       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

troubadix/plugins/spaces_before_dots.py Outdated Show resolved Hide resolved
troubadix/plugins/spaces_before_dots.py Outdated Show resolved Hide resolved
Copy link
Member

@cfi-gb cfi-gb left a comment

Choose a reason for hiding this comment

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

The existing test cases LGTM, thanks a lot for taking care 👍

I would leave the final review, approve and merge for one of the @greenbone/troubadix-maintainers .

Also not sure if it would make sense to split the test_fail case into single ones for each case but would also leave this up to the @greenbone/troubadix-maintainers

mbrinkhoff
mbrinkhoff previously approved these changes Sep 12, 2024
@NiklasHargarter NiklasHargarter force-pushed the space_before_dot branch 2 times, most recently from 474f15a to 768e75c Compare September 26, 2024 14:53
troubadix/plugins/spaces_before_dots.py Outdated Show resolved Hide resolved
troubadix/plugins/spaces_before_dots.py Outdated Show resolved Hide resolved
troubadix/plugins/spaces_before_dots.py Outdated Show resolved Hide resolved
@mbrinkhoff mbrinkhoff added the make release To trigger GitHub release action label Oct 1, 2024
@mbrinkhoff mbrinkhoff enabled auto-merge (rebase) October 1, 2024 08:26
@NiklasHargarter NiklasHargarter dismissed n-thumann’s stale review October 1, 2024 12:52

requested changes were done but didn't register here

@mbrinkhoff mbrinkhoff merged commit a48398c into main Oct 1, 2024
13 checks passed
@mbrinkhoff mbrinkhoff deleted the space_before_dot branch October 1, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
make release To trigger GitHub release action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants