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

Add linters #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions data/Linter/infer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Infer
executable: infer
website: https://fbinfer.com/
packages:
- infer-0.7.0-linux
languages:
- C
- CPlusPlus
- Java
- Objective-C
aspects:
- Security
10 changes: 10 additions & 0 deletions data/Linter/pyflakes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pyflakes
executable: pyflakes
packages:
- pyflakes
languages:
- Python
aspects:
- Syntax
- Unused Code
- Undefined Element
6 changes: 6 additions & 0 deletions data/Package/infer-0.7.0-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: infer
manager: opam
source: https://github.com/facebook/infer/releases/download/
v0.7.0/infer-linux64-v0.7.0.tar.xz
version: 0.7.0
platform: linux
3 changes: 3 additions & 0 deletions data/Package/pyflakes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: pyflakes
manager: pip
version: 2.0.0
3 changes: 3 additions & 0 deletions data/PackageManager/_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- pk: npm
- pk: opam
- pk: pip
1 change: 1 addition & 0 deletions models/Aspect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pk: String
8 changes: 8 additions & 0 deletions models/Linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: String
executable: String
repology_id: String # optional
wikidata: String # optional
website: String
languages: Language[]
aspects: Aspect[] # i.e. CAN_DETECT & CAN_FIX
packages: Package[] # only needed where Repology does not provide
7 changes: 7 additions & 0 deletions models/Package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: String
manager: PackageManager
version: String
repology_id: String # optional
wikidata: String # optional
source: String # optional
platform: Platform # optional
1 change: 1 addition & 0 deletions models/PackageManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pk: String
1 change: 1 addition & 0 deletions models/Platform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pk: String
37 changes: 37 additions & 0 deletions templates/Linter.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ site_title }}: {{ linter.name }}</title>
<link rel="stylesheet" href="../assets/css/coala.css" type="text/css" />
<link rel="stylesheet" href="../assets/css/coast.css" type="text/css" />
</head>
<body>
<section class="thin-row-small">
<h1>{{ linter.name }}</h1>
</section>
<table>
<tr>
<th>executable</th>
<td>{{ linter.executable }}</td>
</tr>
<tr>
<th>Repology</th>
<td>{{ linter.repology_id }}</td>
</tr>
<tr>
<th>Wikidata</th>
<td>{{ linter.wikidata }}</td>
</tr>
<tr>
<th>Packages</th>
<td>
<ul>
{% for package in linter.packages %}
<li>{{ package.manager.name }} {{ package.name }}
{% endfor %}{# for package in linter.packages #}
</ul>
</td>
</tr>
</table>
</body>
</html>
31 changes: 31 additions & 0 deletions templates/Package.html.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ site_title }}: {{ package.name }}</title>
<link rel="stylesheet" href="../assets/css/coala.css" type="text/css" />
<link rel="stylesheet" href="../assets/css/coast.css" type="text/css" />
</head>
<body>
<section class="thin-row-small">
<h1>{{ package.name }}</h1>
</section>
<table>
<tr>
<th>Package manager</th>
<td>{{ package.manager.name }}</td>
</tr>
<tr>
<th>Version</th>
<td>{{ package.version }}</td>
</tr>
<tr>
<th>Source</th>
<td>{{ package.source }}</td>
</tr>
<tr>
<th>Platform</th>
<td>{{ package.platform }}</td>
</tr>
</table>
</body>
</html>
14 changes: 14 additions & 0 deletions templates/home.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@
<section class="thin-row-small">
<h1>{{ page_title }}</h1>
</section>

<section class="thin-row-small">
<h2>Languages</h1>
</section>

<ul class="thin-row-medium" id="languages-list">
{% for language in languages %}
<li><a href="{% url 'languages', language %}">{{ m.language_name(language) }}</a>
{% endfor %}{# for language in languages #}
</ul>

<section class="thin-row-small">
<h2>Linters</h1>
</section>
<ul class="thin-row-medium" id="linter-list">
{% for linter in linters %}
<li><a href="{% url 'linters', linter %}">{{ linter.name }}</a>
{% endfor %}{# for linter in linters #}
</ul>
</body>
</html>
1 change: 1 addition & 0 deletions views/home.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ context:
page-title: Welcome
dynamic:
languages: session.query(Language).all()
linters: session.query(Linter).all()
2 changes: 1 addition & 1 deletion views/languages.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
path:
template: /{{ language.identifier }}
template: /{{ language.identifier }}/
for-each:
language: session.query(Language).all()
template: Language
Expand Down
5 changes: 5 additions & 0 deletions views/linters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
path:
template: /{{ linter.name }}/
for-each:
linter: session.query(Linter).all()
template: Linter
5 changes: 5 additions & 0 deletions views/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
path:
template: /{{ package.manager.pk }}/{{ package.name }}-{{ package.version }}/
for-each:
package: session.query(Package).all()
template: Package