Skip to content

test-linter.pl: detect duplicate sections and superfluous comments - #23573

Closed
vszakats wants to merge 8 commits into
curl:masterfrom
vszakats:t-lint
Closed

vszakats wants to merge 8 commits into
curl:masterfrom
vszakats:t-lint

Conversation

@vszakats

@vszakats vszakats commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Test results with #23571 reverted:

data/test301 has too many '<data>' tags (2 vs. 1 maximum)
data/test702 has too many '<features>' tags (2 vs. 1 maximum)
data/test714 has too many '<features>' tags (2 vs. 1 maximum)
data/test715 has too many '<features>' tags (2 vs. 1 maximum)
data/test1718 has superfluous comment: '# Client-side'
data/test1718 has superfluous comment: '# Verify data after the test has been "shot"'
data/test1456 has too many '<features>' tags (2 vs. 1 maximum)
data/test1800 has too many '<features>' tags (2 vs. 1 maximum)
data/test3202 has too many '<features>' tags (2 vs. 1 maximum)
Error: Process completed with exit code 9.

Ref: https://github.com/curl/curl/actions/runs/39865646942/job/120127058099?pr=23573#step:44:32

Also:

Follow-up to 95f8e3a #23571
Follow-up to ffca9f6 #23562

@github-actions github-actions Bot added tests script CI Continuous Integration labels Oct 22, 2026
@testclutch

This comment was marked as outdated.

Comment thread tests/test-linter.pl Outdated
my $tags = 'testcase|' .
'info|client|reply|verify|' .
'command|data|datacheck|disable|errorcode|features|keywords|killserver|limits|mdtm|name|notexists|postcheck|precheck|' .
'protocol|proxy|server|servercmd|setenv|size|socks|stderr|stdin|stdout|strip|stripfile|strippart|tool|upload|valgrind';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it really need a list of known tags? Can't it detect any used tag and just warn if the same tag appears twice?

@vszakats vszakats Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Some tags can occure twice, and some of those can have a suffix,
so what would be possible is blocklisting all those, but that could be
more cumbersome I think.

Another way is to limit this list to the few that was seen being duplicates
in the past, and/or often used. That would be a shorter list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The blocklist method could work, I'm looking at it.

@vszakats vszakats Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It did work, and simplified/improvied things. It's now also checking
for those exceptions not to occure more than twice.

catch the top 4 of the comments removed recently:
````
2024 # Client-side
1838 # Verify data after the test has been "shot"
1740 # Server-side
  81 # tool is what to use instead of 'curl'
```
@vszakats vszakats changed the title test-linter.pl: detect duplicate sections test-linter.pl: detect duplicate sections and superfluous comments Oct 23, 2026
@vszakats vszakats closed this in 66ca775 Oct 23, 2026
@vszakats
vszakats deleted the t-lint branch October 23, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration script tests

Development

Successfully merging this pull request may close these issues.

3 participants