-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 pslint.py linter and use it on Travis CI #130
Conversation
db0e486
to
69c79a8
Compare
19eaf3a
to
3403ebc
Compare
- echo "EXTRA_DIST =" >gtk-doc.make | ||
- echo "CLEANFILES =" >>gtk-doc.make | ||
- autoreconf --install --force --symlink | ||
- OPTIONS="--with-psl-file=$DIR/public_suffix_list.dat --with-psl-testfile=$DIR/tests/test_psl.txt" |
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.
I see you are still referring to the test_psl.txt file. I assume this line will have to be changed once the following change is completed:
Libpsl is prepared to take the new tests.txt format in it's test suite. I will prepare a new release as soon as you pull the PR into master.
Am I correct?
@rockdaboot I suggest you push an updated version of In this way, we can test this PR from start to end before merging it into master. |
@weppos I made a new libpsl branch 'newfmt' (using tests.txt as default test file) and amended .travis.yml in this PR to explicitly use tests.txt with the new format. |
@rockdaboot that works for me. I'll wait for @gerv approval, as I see there are some files where the copyright is assigned to you, and I want to make sure this is fine for him in terms of acceptance. PS. I see make configure and make clean are quite verbose. Any chance to have something less chatty? I think I may play a little bit around with output redirection. Also, what about the |
@weppos Thanks for reviewing.
./configure has a -q option to silence the configure run. CON: if something breaks, you possibly can't see why.
Only, if we assume to get PSL entries that are different on IDNA2003, IDNA2008 or IDNA2008#46, e.g. the german label 'straße' (ask, If you are interested in the details). In this case we should define what PSL contains. I personally tend to test/support the latest IDNA(2008#46) since it cleans up some incompatibilities between 2003 and 2008. But I also know that most software out there relies on IDNA2003 implementations. |
@gerv friendly ping for a 👍 on the copyright stuff |
@rockdaboot I'm curious. Given the context of this PR, where would you see the test required in #160 (comment) implemented? One of the reason why I am torn about the current test suite depending on libpsl (and therefore also the code here that keeps the same approach) is that we really have no test suite built into this repo. We rely on an external test suite, that doesn't necessarily have to evolve in parallel with the core PSL needs. I'm still torn about using the libpsl in that way. I'd be curious to know where you'd see the test discussed in #160 to be implemented. |
Copyright assigned to someone else is no problems as long as the license is open source, which it is (MIT-style). So go right ahead from a licensing perspective. |
Thanks @gerv, I'll merge this PR tomorrow as it represents an enhancement with what we have so far. |
You are talking about PRIVATE entries must end in a public suffix from the ICANN section. I could add it to the libpsl test suite - it's just a few lines of code (in theory). |
Add pslint.py linter and use it on Travis CI
@weppos Regarding your concerns about using libpsl... |
@rockdaboot Indeed, I appreciate your support. However, I think the specific validation mentioned in #160 could be one of them. I'll start adding a simple test here. I have one more question for you. Let's assume I make some changes to the PSL locally and I want to run the tests before committing. Do you have any suggestion? Should we package the test run process in a Make task so that we can easily run it with a single one-line command, even locally? |
@weppos I just made new libpsl release, so we won't need the extra branch 'newfmt' any more.
But how do you define 'ending' ? #160 is unclear to me (see comment above).
Better a shell script, e.g. 'run_tests.sh' in the main dir. We should call it from .travis.yml and it would be usable locally. I'll see if I find some time in the afternoon. |
The folder is now created as part of the test process since GH-130.
This adds a python PSL linter for use with Travis CI.
The former 'linting' of the PSL done via libpsl pulls in a full C project on each commit to publicsuffix/list. Configure, compile and link steps are a waste of CPU time in comparison with this simple python script.
Simone (@weppos) opened a wiki page with a bunch of tests to perform.
The python script performs all test except 'Order' (the last one in the list).