-
Notifications
You must be signed in to change notification settings - Fork 123
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
Added lint check for duplicate test ids #3017
Conversation
2a5f886
to
c6b9994
Compare
In general, it looks good, it is indeed along the lines of some collection-wide linter. I'll add just a couple of minor minor comments. Edit: BTW plans and stories also have IDs :) |
c6b9994
to
b41b1fd
Compare
Thanks for your feedback! I tried to apply the changes. PTAL @happz I was also looking into updating the (unit) tests and it seems like when adding test files with the duplicate ids, the other tests will break because of this. What do you think about adding a flag to enable/disable such linters on collections? |
Did you try putting them into a dedicated, separate fmf root? We already have https://github.com/teemtee/tmt/tree/main/tests/lint/test/data, we could add something like |
60e1a1a
to
f1ce7a7
Compare
Thanks for the hint! I think I was able to create a few new tests based on this. |
f1ce7a7
to
4b5780b
Compare
4b5780b
to
eaccdda
Compare
@happz Could you have another look at this PR? I've added tests now as well and think it should be complete. |
3aa12f1
to
41b16c3
Compare
@happz Ping :) |
Hmm, all seems unrelated to your changes, it seems there's some problem with debuginfo in rawhide, so, ruining all results. |
930d745
to
e1c370b
Compare
Ah ok. In that case, can we re-run the pipeline again since a few days have passed? |
/packit build |
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.
Nice. Maybe worth adding a release note.
Thanks! Should I add a release note to |
If you'll have time, feel free to add it there, thanks! |
ecbcc65
to
d06fd8e
Compare
Updated ✔️ |
Thanks @engelmi, looks like you missed the release note in d06fd8e |
d06fd8e
to
009be51
Compare
Ups, good catch! Added it. |
/packit build |
009be51
to
9b4d78a
Compare
/packit build |
Fixes: teemtee#2939 In order to be able detect duplicate ids of tests, plans and stories, a new lintable class for such collections has been introduced. It doesn't reflect a specific node in the tree and is specific to lint operations. On this collection, the duplicate lint check is implemented and can be easily extended in the future by additional checks. Signed-off-by: Michael Engel <mengel@redhat.com>
Relates to: teemtee#2939 Extending current tests to verify the new lint feature for checking duplicate ids on tests, plans, stories and across those. Signed-off-by: Michael Engel <mengel@redhat.com>
Relates to: teemtee#2939
9b4d78a
to
9b75f55
Compare
/packit build |
Fixes: teemtee#2939 In order to be able detect duplicate ids of tests, plans and stories, a new lintable class for such collections has been introduced. It doesn't reflect a specific node in the tree and is specific to lint operations. On this collection, the duplicate lint check is implemented and can be easily extended in the future by additional checks. Signed-off-by: Michael Engel <mengel@redhat.com> Co-authored-by: Miloš Prchlík <mprchlik@redhat.com>
Fixes: #2939
In order to be able detect duplicate ids of tests for a given tmt.Tree, a new lintable class Tests has been introduced. It doesn't reflect a specific node in the tree, but rather a collection of test nodes. On this collection, the duplicate lint check is being executed.
The lintable
Tests
implements the lint function for the duplicate test id check - this can be further extended in the future with additional lint checks.Example usage triggering the new lint check:
Pull Request Checklist