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

.coafile: Check yaml files and the templates #39

Merged
merged 1 commit into from
Nov 7, 2018

Conversation

RazvanMitrica
Copy link
Contributor

This entrypoint adds a .coafile for .yaml
and .jinja2 files.

Closes #33

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/Language.html.jinja2, line 17.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/Language.html.jinja2
+++ b/tmp/tmpo9b7vard/templates/Language.html.jinja2
@@ -14,7 +14,7 @@
     <tr>
       <th>Grammar File</th>
       <td>
-        <a href = {{language.grammar_file}}>
+        <a href = {{ language.grammar_file }}>
           {{ m.show_grammar(language.grammar_file) }}
         </a>  
       </td>

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 6.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -3,7 +3,7 @@
 {{ language.full_name }}
 {% else %}
 {{ language.identifier }}
-{% endif %}
+{% endif %}{# if language.full_name #}
 {% endmacro %}
 
 {% macro show_grammar(grammar_file) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 10.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -7,7 +7,7 @@
 {% endmacro %}
 
 {% macro show_grammar(grammar_file) %}
-  {{grammar_file}}
+  {{ grammar_file }}
 {% endmacro %}
 
 {% macro show_list(list, separator=',') %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 15.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -12,7 +12,7 @@
 
 {% macro show_list(list, separator=',') %}
   {% for item in list %}
-    {{ item.pk | escape }}{% if not loop.last %}{{separator}} {% endif %}
+    {{ item.pk | escape }}{% if not loop.last %}{{ separator }} {% endif %}
   {% endfor %}
 {% endmacro %}
 

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -13,7 +13,7 @@
 {% macro show_list(list, separator=',') %}
   {% for item in list %}
     {{ item.pk | escape }}{% if not loop.last %}{{separator}} {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in list #}
 {% endmacro %}
 
 {% macro show_delimiter_list(delimiters, type) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 28.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -25,7 +25,7 @@
         <tt>{{ item.end | escape }}</tt>
       {% else %}
         (EOL)
-      {% endif %}
+      {% endif %}{# if item.end #}
     </li>
     {% endif %}
   {% endfor %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 30.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -27,7 +27,7 @@
         (EOL)
       {% endif %}
     </li>
-    {% endif %}
+    {% endif %}{# if item.type == type #}
   {% endfor %}
 </ul>
 {% endmacro %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/macros.jinja2, line 31.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/macros.jinja2
+++ b/tmp/tmpo9b7vard/templates/macros.jinja2
@@ -28,6 +28,6 @@
       {% endif %}
     </li>
     {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in delimiters #}
 </ul>
 {% endmacro %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on c7a7ee4, file templates/home.html.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpo9b7vard/templates/home.html.jinja2
+++ b/tmp/tmpo9b7vard/templates/home.html.jinja2
@@ -13,7 +13,7 @@
   <ul class="thin-row-medium" id="languages-list">
   {% for language in languages %}
     <li><a href="{% url 'languages', language %}">{{ m.language_name(language) }}</a>
-  {% endfor %}
+  {% endfor %}{# for language in languages #}
   </ul>
 </body>
 </html>

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/home.html.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/home.html.jinja2
+++ b/tmp/tmplz2jz9lw/templates/home.html.jinja2
@@ -13,7 +13,7 @@
   <ul class="thin-row-medium" id="languages-list">
   {% for language in languages %}
     <li><a href="{% url 'languages', language %}">{{ m.language_name(language) }}</a>
-  {% endfor %}
+  {% endfor %}{# for language in languages #}
   </ul>
 </body>
 </html>

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/Language.html.jinja2, line 17.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/Language.html.jinja2
+++ b/tmp/tmplz2jz9lw/templates/Language.html.jinja2
@@ -14,7 +14,7 @@
     <tr>
       <th>Grammar File</th>
       <td>
-        <a href = {{language.grammar_file}}>
+        <a href = {{ language.grammar_file }}>
           {{ m.show_grammar(language.grammar_file) }}
         </a>  
       </td>

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 6.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -3,7 +3,7 @@
 {{ language.full_name }}
 {% else %}
 {{ language.identifier }}
-{% endif %}
+{% endif %}{# if language.full_name #}
 {% endmacro %}
 
 {% macro show_grammar(grammar_file) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 10.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -7,7 +7,7 @@
 {% endmacro %}
 
 {% macro show_grammar(grammar_file) %}
-  {{grammar_file}}
+  {{ grammar_file }}
 {% endmacro %}
 
 {% macro show_list(list, separator=',') %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 15.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -12,7 +12,7 @@
 
 {% macro show_list(list, separator=',') %}
   {% for item in list %}
-    {{ item.pk | escape }}{% if not loop.last %}{{separator}} {% endif %}
+    {{ item.pk | escape }}{% if not loop.last %}{{ separator }} {% endif %}
   {% endfor %}
 {% endmacro %}
 

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -13,7 +13,7 @@
 {% macro show_list(list, separator=',') %}
   {% for item in list %}
     {{ item.pk | escape }}{% if not loop.last %}{{separator}} {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in list #}
 {% endmacro %}
 
 {% macro show_delimiter_list(delimiters, type) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 28.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -25,7 +25,7 @@
         <tt>{{ item.end | escape }}</tt>
       {% else %}
         (EOL)
-      {% endif %}
+      {% endif %}{# if item.end #}
     </li>
     {% endif %}
   {% endfor %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 30.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -27,7 +27,7 @@
         (EOL)
       {% endif %}
     </li>
-    {% endif %}
+    {% endif %}{# if item.type == type #}
   {% endfor %}
 </ul>
 {% endmacro %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on da8c4cb, file templates/macros.jinja2, line 31.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmplz2jz9lw/templates/macros.jinja2
+++ b/tmp/tmplz2jz9lw/templates/macros.jinja2
@@ -28,6 +28,6 @@
       {% endif %}
     </li>
     {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in delimiters #}
 </ul>
 {% endmacro %}

Copy link
Member

@li-boxuan li-boxuan left a comment

Choose a reason for hiding this comment

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

CI is showing you a lot of errors, which is expected. 😉
Since you add rules in .coafile, CI is more powerful and it is able to detect errors using the bears you introduced. You need to fix those errors.

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/Language.html.jinja2, line 17.

Variable blocks should be spaced with 1 spaces on each side.

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/Language.html.jinja2
+++ b/tmp/tmpn_oayuko/templates/Language.html.jinja2
@@ -14,7 +14,7 @@
     <tr>
       <th>Grammar File</th>
       <td>
-        <a href = {{language.grammar_file}}>
+        <a href = {{ language.grammar_file }}>
           {{ m.show_grammar(language.grammar_file) }}
         </a>  
       </td>

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/macros.jinja2, line 6.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/macros.jinja2
+++ b/tmp/tmpn_oayuko/templates/macros.jinja2
@@ -3,7 +3,7 @@
 {{ language.full_name }}
 {% else %}
 {{ language.identifier }}
-{% endif %}
+{% endif %}{# if language.full_name #}
 {% endmacro %}
 
 {% macro show_grammar(grammar_file) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/macros.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/macros.jinja2
+++ b/tmp/tmpn_oayuko/templates/macros.jinja2
@@ -13,7 +13,7 @@
 {% macro show_list(list, separator=',') %}
   {% for item in list %}
     {{ item.pk | escape }}{% if not loop.last %}{{separator}} {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in list #}
 {% endmacro %}
 
 {% macro show_delimiter_list(delimiters, type) %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/macros.jinja2, line 28.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/macros.jinja2
+++ b/tmp/tmpn_oayuko/templates/macros.jinja2
@@ -25,7 +25,7 @@
         <tt>{{ item.end | escape }}</tt>
       {% else %}
         (EOL)
-      {% endif %}
+      {% endif %}{# if item.end #}
     </li>
     {% endif %}
   {% endfor %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/macros.jinja2, line 30.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/macros.jinja2
+++ b/tmp/tmpn_oayuko/templates/macros.jinja2
@@ -27,7 +27,7 @@
         (EOL)
       {% endif %}
     </li>
-    {% endif %}
+    {% endif %}{# if item.type == type #}
   {% endfor %}
 </ul>
 {% endmacro %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/macros.jinja2, line 31.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/macros.jinja2
+++ b/tmp/tmpn_oayuko/templates/macros.jinja2
@@ -28,6 +28,6 @@
       {% endif %}
     </li>
     {% endif %}
-  {% endfor %}
+  {% endfor %}{# for item in delimiters #}
 </ul>
 {% endmacro %}

@jayvdb
Copy link
Member

jayvdb commented Nov 5, 2018

Comment on 3eb6313, file templates/home.html.jinja2, line 16.

Unlabeled control end tag

Origin: Jinja2Bear, Section: jinja2.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpn_oayuko/templates/home.html.jinja2
+++ b/tmp/tmpn_oayuko/templates/home.html.jinja2
@@ -13,7 +13,7 @@
   <ul class="thin-row-medium" id="languages-list">
   {% for language in languages %}
     <li><a href="{% url 'languages', language %}">{{ m.language_name(language) }}</a>
-  {% endfor %}
+  {% endfor %}{# for language in languages #}
   </ul>
 </body>
 </html>

.coafile Outdated
@@ -0,0 +1,16 @@
[Default]
Copy link
Member

Choose a reason for hiding this comment

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

an empty Default is useless, and Default is deprecated anyway ... just remove

.coafile Outdated
[Default]

[autopep8]
bears = PEP8Bear, PycodestyleBear
Copy link
Member

Choose a reason for hiding this comment

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

these are python bears, and there is no python files in this repo

.coafile Outdated

[jinja2]
bears = Jinja2Bear
files = **.jinja2, **.jj2
Copy link
Member

Choose a reason for hiding this comment

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

there are no .jj2 files in this repo

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 saw there were jj2 files on other repos and I thought that those kind of files could be included here in the future as well.

.coafile Outdated

[yaml]
bears = YAMLLintBear
files = *.yml, **/*.yaml
Copy link
Member

Choose a reason for hiding this comment

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

**.yaml does the same thing

@@ -1,7 +1,8 @@
identifier: TinyBasic
full_name: TinyBasic
wikidata: Q586622
grammar_file: https://github.com/antlr/grammars-v4/tree/master/tinybasic/tinybasic.g4
grammar_file: https://github.com/antlr/grammars-v4/tree/master/tinybasic
/tinybasic.g4
Copy link
Member

Choose a reason for hiding this comment

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

in other cases you leave the / on the previous line. here it is different. please be consistent.

This entrypoint adds a .coafile for .yaml
and .jinja2 files.

Closes coala#33
@jayvdb
Copy link
Member

jayvdb commented Nov 7, 2018

ack 923609d

@jayvdb
Copy link
Member

jayvdb commented Nov 7, 2018

@gitmate-bot ff

@jayvdb
Copy link
Member

jayvdb commented Nov 7, 2018

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently ⚠️

@jayvdb jayvdb merged commit 923609d into coala:master Nov 7, 2018
@jayvdb
Copy link
Member

jayvdb commented Nov 7, 2018

Automated fastforward with GitMate.io was successful! 🎉

@RazvanMitrica RazvanMitrica deleted the issue33 branch November 7, 2018 09:20
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.

3 participants