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

Check for license only in Cargo.toml #13027

Merged
merged 1 commit into from Aug 25, 2016
Merged

Check for license only in Cargo.toml #13027

merged 1 commit into from Aug 25, 2016

Conversation

@UK992
Copy link
Contributor

UK992 commented Aug 24, 2016

This fix problem with false reporting about missing license in every toml file, that is not Cargo.toml

r? @wafflespeanut

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors

This change is Reviewable

@highfive
Copy link

highfive commented Aug 24, 2016

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/tidy/servo_tidy_tests/test_tidy.py, python/tidy/servo_tidy_tests/Cargo.toml, python/tidy/servo_tidy_tests/test.toml, python/tidy/servo_tidy/tidy.py
@UK992 UK992 force-pushed the UK992:tidy-toml branch from 561f18d to 1641a03 Aug 24, 2016
@@ -117,7 +117,7 @@ def test_webidl(self):
self.assertNoMoreErrors(errors)

def test_toml(self):
errors = tidy.collect_errors_for_files(iterFile('test.toml'), [tidy.check_toml], [], print_text=False)
errors = tidy.collect_errors_for_files(iterFile('test-Cargo.toml'), [tidy.check_toml], [], print_text=False)

This comment has been minimized.

@wafflespeanut

wafflespeanut Aug 25, 2016

Member

Nit: Let the new name be lower-cased (like, test-cargo.toml)

Why should this be prefixed this with test-? Why can't this simply be Cargo.toml?

This comment has been minimized.

@UK992

UK992 Aug 25, 2016

Author Contributor

Renamed to Cargo.toml.

@@ -312,7 +311,7 @@ def find_reverse_dependencies(dependency, version, content):


def check_toml(file_name, lines):
if not file_name.endswith(".toml"):
if not file_name.endswith("Cargo.toml"):

This comment has been minimized.

@wafflespeanut

wafflespeanut Aug 25, 2016

Member

Shouldn't this check be file_name == 'Cargo.toml' then?

This comment has been minimized.

@UK992

UK992 Aug 25, 2016

Author Contributor

This won't work, because file_name is a path, not only file name.

This comment has been minimized.

@wafflespeanut

wafflespeanut Aug 25, 2016

Member

Oh, right. nvm :)

@UK992 UK992 force-pushed the UK992:tidy-toml branch from 1641a03 to 0f07517 Aug 25, 2016
@wafflespeanut
Copy link
Member

wafflespeanut commented Aug 25, 2016

Thanks for the cleanup! :)

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2016

📌 Commit 0f07517 has been approved by Wafflespeanut

@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2016

Testing commit 0f07517 with merge 4980185...

bors-servo added a commit that referenced this pull request Aug 25, 2016
Check for license only in Cargo.toml

This fix problem with false reporting about missing license in every toml file, that is not Cargo.toml

r? @wafflespeanut

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13027)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2016

💔 Test failed - linux-rel

@wafflespeanut
Copy link
Member

wafflespeanut commented Aug 25, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2016

Testing commit 0f07517 with merge 8a5e1b7...

bors-servo added a commit that referenced this pull request Aug 25, 2016
Check for license only in Cargo.toml

This fix problem with false reporting about missing license in every toml file, that is not Cargo.toml

r? @wafflespeanut

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13027)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 25, 2016

@bors-servo bors-servo merged commit 0f07517 into servo:master Aug 25, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@UK992 UK992 deleted the UK992:tidy-toml branch Jan 26, 2017
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
You can’t perform that action at this time.