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 a lint that checks paths are unique irrespective of case #28396

Merged
merged 1 commit into from Apr 22, 2021

Conversation

@jgraham
Copy link
Contributor

@jgraham jgraham commented Apr 7, 2021

Paths that are the same excluding case don't work reliably across
operating systems and can be forbidden by vendor CI. So we should
error on these paths in the lint.

@wpt-pr-bot wpt-pr-bot requested review from foolip and LukeZielinski Apr 7, 2021
@jgraham jgraham force-pushed the duplicate_path_case_insensitive branch from fcda430 to 020e300 Apr 7, 2021
@Ms2ger
Ms2ger approved these changes Apr 21, 2021
Copy link
Contributor

@Ms2ger Ms2ger left a comment

Seems fine, once CI passes.

@@ -396,6 +396,20 @@ def check_unique_testharness_basenames(repo_root, paths):
return errors


def check_unique_case_insensitive_paths(repo_root, paths):
# type: (Text, List[Text]) -> List[rules.Error]
seen = {}

This comment has been minimized.

@Ms2ger

Ms2ger Apr 21, 2021
Contributor

tools/lint/lint.py:401: error: Need type annotation for 'seen' (hint: "seen: Dict[<type>, <type>] = ...")
Paths that are the same excluding case don't work reliably across
operating systems and can be forbidden by vendor CI. So we should
error on these paths in the lint.
@jgraham jgraham force-pushed the duplicate_path_case_insensitive branch from 020e300 to d711d35 Apr 22, 2021
@jgraham jgraham merged commit ff952d5 into master Apr 22, 2021
42 of 45 checks passed
42 of 45 checks passed
@github-actions
build-and-publish
Details
@github-actions
build-and-tag
Details
@azure-pipelines
Azure Pipelines Build #20210422.44 had test failures
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.6) tools/wpt/ tests: Windows + Python 3.6 failed
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: Windows + Python 3.8) tools/wpt/ tests: Windows + Python 3.8 failed
Details
@azure-pipelines
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
@azure-pipelines
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
@azure-pipelines
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
@azure-pipelines
Azure Pipelines (infrastructure/ tests: macOS) infrastructure/ tests: macOS succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: Windows + Python 3.6) tools/ unittests: Windows + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: Windows + Python 3.8) tools/ unittests: Windows + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: macOS + Python 3.6) tools/ unittests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/ unittests: macOS + Python 3.8) tools/ unittests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.6) tools/wpt/ tests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wpt/ tests: macOS + Python 3.8) tools/wpt/ tests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.6) tools/wptrunner/ unittests: Windows + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: Windows + Python 3.8) tools/wptrunner/ unittests: Windows + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.6) tools/wptrunner/ unittests: macOS + Python 3.6 succeeded
Details
@azure-pipelines
Azure Pipelines (tools/wptrunner/ unittests: macOS + Python 3.8) tools/wptrunner/ unittests: macOS + Python 3.8 succeeded
Details
@azure-pipelines
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
@azure-pipelines
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
@community-tc-integration
download-firefox-nightly Community-TC (pull_request)
Details
@community-tc-integration
infrastructure/ tests (Python 3) Community-TC (pull_request)
Details
@community-tc-integration
lint Community-TC (pull_request)
Details
@community-tc-integration
resources/ tests (Python 3.6) Community-TC (pull_request)
Details
@community-tc-integration
resources/ tests (Python 3.8) Community-TC (pull_request)
Details
@community-tc-integration
sink-task Community-TC (pull_request)
Details
@staging-wpt-fyi
staging.wpt.fyi - chrome[experimental] Chrome results
Details
@staging-wpt-fyi
staging.wpt.fyi - firefox[experimental] Firefox results
Details
@staging-wpt-fyi
staging.wpt.fyi - safari[experimental] Safari results
Details
@community-tc-integration
tools/ integration tests (Python 3.6) Community-TC (pull_request)
Details
@community-tc-integration
tools/ integration tests (Python 3.8) Community-TC (pull_request)
Details
@community-tc-integration
tools/ unittests (Python 3.6) Community-TC (pull_request)
Details
@community-tc-integration
tools/ unittests (Python 3.8) Community-TC (pull_request)
Details
@community-tc-integration
update-built Community-TC (pull_request)
Details
@community-tc-integration
wpt-chrome-dev-results Community-TC (pull_request)
Details
@community-tc-integration
wpt-chrome-dev-results-without-changes Community-TC (pull_request)
Details
@community-tc-integration
wpt-chrome-dev-stability Community-TC (pull_request)
Details
@community-tc-integration
wpt-decision-task Community-TC (pull_request)
Details
@community-tc-integration
wpt-firefox-nightly-results Community-TC (pull_request)
Details
@community-tc-integration
wpt-firefox-nightly-results-without-changes Community-TC (pull_request)
Details
@community-tc-integration
wpt-firefox-nightly-stability Community-TC (pull_request)
Details
@wpt-fyi
wpt.fyi - chrome[experimental] Chrome results
Details
@wpt-fyi
wpt.fyi - firefox[experimental] Firefox results
Details
@wpt-fyi
wpt.fyi - safari[experimental] Safari results
Details
@jgraham jgraham deleted the duplicate_path_case_insensitive branch Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants