-
Notifications
You must be signed in to change notification settings - Fork 14
Add .coafile #42
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 .coafile #42
Conversation
.travis.yml
Outdated
@@ -17,11 +17,15 @@ before_install: | |||
- phantomjs --version | |||
|
|||
install: | |||
# Coala doesn't discover local packages. |
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.
lowercase c
in coala
I think the commit message needs some changes. |
@nemaniarjun And what should it be? |
ce9b76f
to
cbaa7c7
Compare
.yamllint
Outdated
@@ -0,0 +1,3 @@ | |||
--- | |||
rules: | |||
truthy: disable # The current version of yaml, checking keys. |
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.
Why you need this?
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.
The current version of yaml, checking keys. While in travis we use on
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.
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.
"truthy value is not quoted"
easy solution -- quote it.
or use alternative travis syntax to achieve the same effect.
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.
It might also be a bug in yamllint, in which case you should look at yamllint to see if there is an existing issue, and create an issue if it doesnt already exist.
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.
It is upstream bugs. In my opinion.
And not using it for now.
LICENSE.md
Outdated
@@ -1,11 +1,15 @@ | |||
GNU GENERAL PUBLIC LICENSE | |||
Version 3, 29 June 2007 |
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.
Fix #41 first
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.
Now #46 (can be an extra commit in this PR)
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.
And now fix #46
You should never modify a LICENSE file, not even to change the syntax.
It must be a verbatim copy of the license from a verifiable source.
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 miss understood with extra commits. @blazeu explained
e141856
to
688699b
Compare
@bekicot its not just a .coafile change there is also a change in the README. I'm not sure if that should be a separate commit but it should at least be reflected in the commit description if you are not going to make it into another commit. |
@palash25 Change in README is already explained in commit message as |
So sorry @bekicot didn't know how I missed that 👍 |
538dde8
to
a7a3ccb
Compare
.coafile
Outdated
@@ -0,0 +1,11 @@ | |||
[all] | |||
ignore = node_modules/**, bower_components/**, dist/**, .eslintrc.js |
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.
ignore .git
also?
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.
locally coala will run on .git folder also ?
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.
Coala shouldn't check .git
. If it does, then it is a bug.
713800f
to
fba142c
Compare
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.
Please add ESLintBear
d1b49c9
to
a5f515a
Compare
.coafile
Outdated
eslint_config = .eslintrc.js | ||
files = *.js, app/**.js, config/*.js, tests/**.js | ||
|
||
[all.ESLintBear] |
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.
Should be all.markdown
?
The section name doesn't have to be the bear name
The reason why it shouldn't be the bear name, because we might add more bear into the section.
The reason why we needed the SpaceConsistencyBear
to be in a separate section is because it should run on all files and the section name doesn't have to be SpaceConsistencyBear
if we want it consistent with the rest of coala repos.
Maybe see https://github.com/coala/community/blob/master/.coafile and https://github.com/coala/gci-leaders/blob/master/.coafile for naming.
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.
ping @jayvdb
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.
(yes, section names shouldnt be bear names as a general rule)
it has been renamed to all.js
, so this is good now.
.travis.yml
Outdated
language: node_js | ||
node_js: | ||
- "6" | ||
language: python |
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.
no.
This is a node project, it must have node as its global language.
That is needed so that we can have multiple versions in the global matrix.
You need to create a coala stage which is python, as already requested at #42 (comment) , and you have been given the recipe even in #40 and fixup #55
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.
Was following your suggestion on gitter to follow gci-leaders
. I thought you aware of my problem. And offering an easy solution.
I was using jobs and nodejs before and there was an error. Pushed before the hint is suggested.
needs a rebase. |
4642bbf
to
772f1b7
Compare
.travis.yml
Outdated
script: false | ||
after_success: false | ||
before_deploy: false | ||
deploy: false |
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.
use <<: *disable_global
, like the example you have been given.
Otherwise the lint job is inaccurately marked as "Node.js: 6 Python 3.6" on the matrix
https://travis-ci.org/coala/git-task-list/builds/391029250
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.
*disable_global Doesn't work, There is a failed 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.
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 needs before_script global hook.
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.
That log is for the commit
d421a13#diff-354f30a63fb0907d4ad57269548329e3R36
which doesnt use disable_global. And i put a comment on that commit showing why it failed.
.coafile
Outdated
|
||
[all.yaml] | ||
bears = YAMLLintBear | ||
files = **.yml |
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.
yaml files also are .yaml
.coafile
Outdated
@@ -0,0 +1,27 @@ | |||
[all] | |||
ignore = node_modules/**, bower_components/**, dist/**, .eslintrc.js, tmp/**, |
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.
why is .eslintrc.js
ignored globally?
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.
Yes, it raised warning as eslintbear itself won't lint .eslintrc.js. I dont know how to remove the warning. And force lint it, so ignore.
Should be ignored in js, instead of global.
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.
*eslintbear. Not eslint itself
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.
Traceback (most recent call last):
File "/Users/bekicot/Library/Python/3.6/lib/python/site-packages/coalib/bears/Bear.py", line 282, in execute
return [] if result is None else list(result)
File "/usr/local/lib/python3.6/site-packages/bears/js/ESLintBear.py", line 88, in process_output
if result['ruleId'] is not None else self)
KeyError: 'ruleId'
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.
No suficient knowledge to debug it in timely maner
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 also try
./node_modules/eslint --no-ignore --no-color --stdin --stdin-filename=/home/travis/build/coala/git-task-list/.eslintrc.js --config .eslintrc.js < .eslintrc.
it works fine.
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.
GCI Leader seems to have the same problem.
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.
coala --files=git-task-list/.eslintrc.js --bears=ESLintBear -V
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 asked you (two comments earlier right here) to push to travis and show me a travis error.
Anyway ... I did it, and now I can see it
https://travis-ci.org/jayvdb/gsoc-prep-tasks/jobs/391075675#L958
I see you did create an issue coala/coala-bears#2533
Now add a comment in your .coafile about that bug.
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.
It is not raised an error, just a warning. It was anoying so i ignored it
.coafile
Outdated
.git/** | ||
|
||
[all.SpaceConsistencyBear] | ||
files = **.js, **.json, **.yml, **.md, .eslintrc |
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.
Executing section all.SpaceConsistencyBear...
[WARNING][21:16:59] No files matching '/home/travis/build/coala/git-task-list/.eslintrc' were found.
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.
Will remove, and ignore eslint on js. it is invalid name
.coafile
Outdated
[all.js] | ||
bears = ESLintBear | ||
eslint_config = .eslintrc.js | ||
files = *.js, app/**.js, config/*.js, tests/**.js |
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.
Ideally **.js
, and using ignore to handle any files which are special cases and should not be linted by this bear.
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.
Hanged in my machine. Not a big deal, i will Use **.js
eafd181
to
58d5e38
Compare
.travis.yml
Outdated
@@ -33,6 +33,22 @@ jobs: | |||
install: pip install moban | |||
script: .ci/check_moban.sh | |||
|
|||
- stage: lint |
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.
You have not used disable_global as requested, or given a reason why it wont work.
2893e8f
to
f55b4b2
Compare
.coafile
Outdated
ignore = node_modules/**, bower_components/**, dist/**, tmp/**, .git/** | ||
|
||
[all.SpaceConsistencyBear] | ||
files = **.js, **.json, **.yml, **.md, .eslintrc.js |
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.
You do not need to add .eslintrc.js
I removed it, and it was included because of **.js
see https://travis-ci.org/jayvdb/gsoc-prep-tasks/jobs/391075675#L741
4219ffd
to
a3ef738
Compare
.coafile
Outdated
eslint_config = .eslintrc.js | ||
files = **.js | ||
# See https://github.com/coala/coala-bears/issues/2533 | ||
ignore = .eslintrc.js |
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.
The existing ignore rules are being discard here.
use
ignore += .eslintrc.js
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.
Two of the commits use Fixes: ..
instead of Fixes ...
Fix lint error raised by coala at LICENSE.md && README.md
Closes #31
@blazeu && @jayvdb && @yashovardhanagrawal