Skip to content

Commit 5e97d3b

Browse files
feat: switch to canonical repolinter
1 parent cee9dce commit 5e97d3b

13 files changed

+605
-3984
lines changed

Dockerfile

+4-48
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,8 @@
1-
ARG RUNTIME_DEPS="git libicu-dev perl"
2-
ARG BUILD_DEPS="make build-essential cmake pkg-config zlib1g-dev libcurl4-openssl-dev libssl-dev libldap2-dev libidn11-dev"
1+
FROM ghcr.io/todogroup/repolinter:v0.11.1
32

4-
FROM ruby:2.6-slim as ruby-deps
5-
ARG RUNTIME_DEPS
6-
ARG BUILD_DEPS
7-
8-
# set to always UTF8
9-
ENV LANG=C.UTF-8
10-
11-
# Install build deps
12-
RUN apt-get update && \
13-
apt-get install --no-install-recommends -y $RUNTIME_DEPS $BUILD_DEPS && \
14-
gem update --system --silent
15-
16-
# Install ruby gems
17-
WORKDIR /app
18-
COPY Gemfile* ./
19-
RUN bundle config path vendor/bundle && \
20-
bundle install --jobs 4 --retry 3
21-
22-
# cleanup
23-
RUN apt-get remove -y $BUILD_DEPS && \
24-
apt-get autoremove -y && \
25-
rm -rf /var/lib/apt/lists/*
26-
27-
FROM python:2.7-slim as python-deps
28-
29-
# docutils for github-markup
30-
RUN python -m pip install --upgrade pip && \
31-
pip install docutils
32-
33-
FROM node:lts-slim
34-
35-
# Copy Ruby dependencies
36-
COPY --from=ruby-deps / /
37-
COPY --from=python-deps / /
38-
39-
# Install node_modules
40-
WORKDIR /app
41-
COPY package*.json ./
42-
RUN npm install --production
43-
44-
# move the rest of the project over
3+
# copy repolinter-action
4+
WORKDIR /repolinter-action
455
COPY dist dist
466

47-
# Configure bundler
48-
ENV BUNDLE_GEMFILE=/app/Gemfile
49-
ENV BUNDLE_PATH=/app/vendor/bundle
50-
517
# Working directory will automagically be set to github workspace when the container is executed
52-
ENTRYPOINT ["bundle", "exec", "node /app/dist/index.js"]
8+
ENTRYPOINT ["bundle", "exec", "node /repolinter-action/dist/index.js"]

dist/error.css

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
body {
2+
margin: 0;
3+
padding: 80px 100px;
4+
font: 13px "Helvetica Neue", "Lucida Grande", "Arial";
5+
background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9));
6+
background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9);
7+
background-repeat: no-repeat;
8+
color: #555;
9+
-webkit-font-smoothing: antialiased;
10+
}
11+
h1, h2, h3 {
12+
margin: 0;
13+
font-size: 22px;
14+
color: #343434;
15+
}
16+
h1 em, h2 em {
17+
padding: 0 5px;
18+
font-weight: normal;
19+
}
20+
h1 {
21+
font-size: 60px;
22+
}
23+
h2 {
24+
margin-top: 10px;
25+
}
26+
h3 {
27+
margin: 5px 0 10px 0;
28+
padding-bottom: 5px;
29+
border-bottom: 1px solid #eee;
30+
font-size: 18px;
31+
}
32+
ul {
33+
margin: 0;
34+
padding: 0;
35+
}
36+
ul li {
37+
margin: 5px 0;
38+
padding: 3px 8px;
39+
list-style: none;
40+
}
41+
ul li:hover {
42+
cursor: pointer;
43+
color: #2e2e2e;
44+
}
45+
ul li .path {
46+
padding-left: 5px;
47+
font-weight: bold;
48+
}
49+
ul li .line {
50+
padding-right: 5px;
51+
font-style: italic;
52+
}
53+
ul li:first-child .path {
54+
padding-left: 0;
55+
}
56+
p {
57+
line-height: 1.5;
58+
}
59+
a {
60+
color: #555;
61+
text-decoration: none;
62+
}
63+
a:hover {
64+
color: #303030;
65+
}
66+
#stacktrace {
67+
margin-top: 15px;
68+
}

dist/error.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html>
2+
<head>
3+
<title>{error}</title>
4+
<style>{style}</style>
5+
</head>
6+
<body>
7+
<div id="wrapper">
8+
<h1>{title}</h1>
9+
<h2><em>{statusCode}</em> {error}</h2>
10+
{explanation}
11+
{response}
12+
<ul id="stacktrace">{stack}</ul>
13+
</div>
14+
</body>
15+
</html>

dist/index.js

+490-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/regexps.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rules/file-contents-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"content": { "type": "string" },
1515
"flags": { "type": "string" },
1616
"human-readable-content": { "type": "string" },
17-
"fail-on-non-exist": {
17+
"fail-on-non-existent": {
1818
"type": "boolean",
1919
"default": false
2020
}

dist/rules/file-not-contents-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"content": { "type": "string" },
1515
"flags": { "type": "string" },
1616
"human-readable-content": { "type": "string" },
17-
"fail-on-non-exist": {
17+
"fail-on-non-existent": {
1818
"type": "boolean",
1919
"default": false
2020
}

dist/schema.json

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"properties": {
1515
"$schema": { "type": "string" },
1616
"version": { "const": 2 },
17+
"extends": {
18+
"type": "string",
19+
"title": "URL or path of ruleset file this ruleset extends"
20+
},
1721
"axioms": {
1822
"type": "object",
1923
"title": "The axioms schema",

0 commit comments

Comments
 (0)