Skip to content

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

Merged
merged 3 commits into from
Jun 12, 2018
Merged

Add .coafile #42

merged 3 commits into from
Jun 12, 2018

Conversation

bekicot
Copy link
Contributor

@bekicot bekicot commented Jun 5, 2018

Fix lint error raised by coala at LICENSE.md && README.md

Closes #31

@blazeu && @jayvdb && @yashovardhanagrawal

.travis.yml Outdated
@@ -17,11 +17,15 @@ before_install:
- phantomjs --version

install:
# Coala doesn't discover local packages.
Copy link
Member

Choose a reason for hiding this comment

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

lowercase c in coala

@nemani
Copy link
Member

nemani commented Jun 5, 2018

I think the commit message needs some changes.

@bekicot
Copy link
Contributor Author

bekicot commented Jun 5, 2018

@nemaniarjun And what should it be?

@bekicot bekicot force-pushed the add-coafile branch 3 times, most recently from ce9b76f to cbaa7c7 Compare June 5, 2018 17:11
.yamllint Outdated
@@ -0,0 +1,3 @@
---
rules:
truthy: disable # The current version of yaml, checking keys.
Copy link
Member

Choose a reason for hiding this comment

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

Why you need this?

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

@bekicot bekicot Jun 7, 2018

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
Copy link
Member

Choose a reason for hiding this comment

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

Fix #41 first

Copy link
Member

@jayvdb jayvdb Jun 7, 2018

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)

Copy link
Member

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.

Copy link
Contributor Author

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

@jayvdb jayvdb added the blocked label Jun 5, 2018
@bekicot bekicot force-pushed the add-coafile branch 2 times, most recently from e141856 to 688699b Compare June 5, 2018 17:19
@palash25
Copy link

palash25 commented Jun 5, 2018

@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.

@bekicot
Copy link
Contributor Author

bekicot commented Jun 5, 2018

@palash25 Change in README is already explained in commit message as fix

@palash25
Copy link

palash25 commented Jun 5, 2018

So sorry @bekicot didn't know how I missed that 👍

@bekicot bekicot force-pushed the add-coafile branch 5 times, most recently from 538dde8 to a7a3ccb Compare June 5, 2018 18:02
.coafile Outdated
@@ -0,0 +1,11 @@
[all]
ignore = node_modules/**, bower_components/**, dist/**, .eslintrc.js
Copy link
Member

Choose a reason for hiding this comment

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

ignore .git also?

Copy link
Member

@RaiVaibhav RaiVaibhav Jun 5, 2018

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 ?

Copy link
Contributor Author

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.

@bekicot bekicot force-pushed the add-coafile branch 3 times, most recently from 713800f to fba142c Compare June 5, 2018 19:55
@jayvdb jayvdb added process/wip and removed blocked labels Jun 7, 2018
blazeu
blazeu previously requested changes Jun 7, 2018
Copy link
Member

@blazeu blazeu left a comment

Choose a reason for hiding this comment

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

Please add ESLintBear

@bekicot bekicot force-pushed the add-coafile branch 4 times, most recently from d1b49c9 to a5f515a Compare June 8, 2018 01:42
.coafile Outdated
eslint_config = .eslintrc.js
files = *.js, app/**.js, config/*.js, tests/**.js

[all.ESLintBear]
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

ping @jayvdb

Copy link
Member

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.

@blazeu blazeu requested a review from jayvdb June 11, 2018 11:46
.travis.yml Outdated
language: node_js
node_js:
- "6"
language: python
Copy link
Member

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

Copy link
Contributor Author

@bekicot bekicot Jun 11, 2018

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.

@jayvdb
Copy link
Member

jayvdb commented Jun 11, 2018

needs a rebase.

@bekicot bekicot force-pushed the add-coafile branch 2 times, most recently from 4642bbf to 772f1b7 Compare June 11, 2018 23:52
.travis.yml Outdated
script: false
after_success: false
before_deploy: false
deploy: false
Copy link
Member

@jayvdb jayvdb Jun 11, 2018

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

Copy link
Member

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
Copy link
Member

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/**,
Copy link
Member

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?

Copy link
Contributor Author

@bekicot bekicot Jun 12, 2018

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

*eslintbear. Not eslint itself

Copy link
Contributor Author

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'

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

@bekicot bekicot Jun 12, 2018

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

@bekicot bekicot force-pushed the add-coafile branch 3 times, most recently from eafd181 to 58d5e38 Compare June 12, 2018 01:43
.travis.yml Outdated
@@ -33,6 +33,22 @@ jobs:
install: pip install moban
script: .ci/check_moban.sh

- stage: lint
Copy link
Member

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.

@bekicot bekicot force-pushed the add-coafile branch 2 times, most recently from 2893e8f to f55b4b2 Compare June 12, 2018 02:12
.coafile Outdated
ignore = node_modules/**, bower_components/**, dist/**, tmp/**, .git/**

[all.SpaceConsistencyBear]
files = **.js, **.json, **.yml, **.md, .eslintrc.js
Copy link
Member

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

@bekicot bekicot force-pushed the add-coafile branch 2 times, most recently from 4219ffd to a3ef738 Compare June 12, 2018 03:17
.coafile Outdated
eslint_config = .eslintrc.js
files = **.js
# See https://github.com/coala/coala-bears/issues/2533
ignore = .eslintrc.js
Copy link
Member

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

Copy link
Member

@jayvdb jayvdb left a 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 ...

bekicot added 3 commits June 12, 2018 11:17
remove insert_final_newline for hbs file in
.enditorconfig

Fixes coala#53
Add a coala's job
Fix lint error in README.md
Add remark packages to package.json

Closes coala#31
@jayvdb jayvdb merged commit 90117fb into coala:master Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants