feat: Add flagsmith-lint-tests and fix all violations#178
Merged
Conversation
flagsmith-lint-tests and fix all violations
a150650 to
1292a65
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
==========================================
+ Coverage 95.90% 96.11% +0.21%
==========================================
Files 90 92 +2
Lines 3051 3220 +169
==========================================
+ Hits 2926 3095 +169
Misses 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b99d2c7 to
87ee37d
Compare
Add a custom linter (flagsmith-lint-tests) enforcing Flagsmith test
conventions: function-only tests (FT001), no unittest imports (FT002),
test_{subject}__{condition}__{expected} naming (FT003), and
Given/When/Then comments (FT004).
87ee37d to
b53f593
Compare
Install the flagsmith-lint-tests hook in pre-commit config and fix all
existing FT003/FT004 violations across the test suite by renaming tests
to test_{subject}__{condition}__{expected} and adding Given/When/Then
comments.
b53f593 to
86dd5c9
Compare
4 tasks
ce0d817 to
9407e0f
Compare
emyller
approved these changes
Mar 12, 2026
Contributor
emyller
left a comment
There was a problem hiding this comment.
I was about to comment on the rev line... LGTM!
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.
flagsmith-lint-tests) enforcing test conventions: function-only tests (FT001), no unittest imports (FT002),test_{subject}__{condition}__{expected}naming (FT003), and Given/When/Then comments (FT004)Usage
To use the hook from another repo, add to
.pre-commit-config.yaml:Test plan
python -m common.lint_testspasses on all test files