Testing: add GitHub action to check all lines are <= 80 characters#126
Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom Jul 14, 2025
Merged
Conversation
0afe2d9 to
ccd3793
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds a GitHub Actions workflow that enforces an 80-character maximum on newly added lines in src/, examples/, and jni/ directories.
- Introduces
.github/workflows/line-length-check.ymlto run on all pull requests - Scans only changed files under the target directories and fails if any added line exceeds 80 characters
Comments suppressed due to low confidence (3)
.github/workflows/line-length-check.yml:33
- [nitpick] Consider using mktemp to generate unique temporary filenames instead of fixed names (violations.tmp and changed_files.txt) to avoid collisions and streamline cleanup.
echo > violations.tmp
.github/workflows/line-length-check.yml:41
- [nitpick] You can simplify the two-step grep filter by matching only added lines that don't start with multiple pluses: e.g., grep -E '^+[^+]' to avoid the separate
grep -v '^+++'.
git diff "origin/$BASE_BRANCH"...HEAD "$file" | \
.github/workflows/line-length-check.yml:49
- Include the offending line number in the output (e.g., using grep -n) so developers can directly locate and fix the long line without running additional commands.
echo "❌ $file - Line too long ($char_count characters)"
ccd3793 to
25bca96
Compare
25bca96 to
1bb3016
Compare
JacobBarthelmeh
approved these changes
Jul 14, 2025
This file contains hidden or 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
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.
This PR adds a GitHub action that checks to make sure all added lines are <= 80 characters, to match internal coding standards.
./src,./examples, and./jnidirectoriesExample of a failure run: https://github.com/wolfSSL/wolfcrypt-jni/actions/runs/16231643997/job/45835457598?pr=126