Skip to content

Commit 5ae3857

Browse files
authored
Merge pull request #210 from plotly/lint-all-the-files
Lint all the files
2 parents a728b5d + 18e91c4 commit 5ae3857

File tree

101 files changed

+149
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+149
-131
lines changed

.github/labeler.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,3 @@ CI:
1414
enhancement:
1515
- "src/*.jl"
1616
- "./*"
17-
18-
19-
20-
21-

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- name: CompatHelper.main()
1313
env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
run: julia -e 'using CompatHelper; CompatHelper.main()'
15+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/lint.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint Markdown
1+
name: Lint
22

33
on: [push, pull_request]
44

@@ -11,5 +11,25 @@ jobs:
1111
uses: actions/setup-node@v3
1212
with:
1313
node-version: '18'
14-
- run: npm install -g markdownlint-cli
15-
- run: markdownlint '**/*.md' --ignore node_modules
14+
- name: "Lint markdown files"
15+
run: |
16+
npm install -g markdownlint-cli
17+
markdownlint '**/*.md' --ignore-path=.gitignore
18+
- name: "No trailing whitespaces at EOLs"
19+
run: |
20+
EXIT_CODE=0
21+
git --no-pager grep --full-name -I -n -e ' $' . && EXIT_CODE=1
22+
exit $EXIT_CODE
23+
- name: "No tab characters"
24+
run: |
25+
EXIT_CODE=0
26+
git --no-pager grep --full-name -I -n -P '\t' . && EXIT_CODE=1
27+
exit $EXIT_CODE
28+
- name: "Newline at EOF"
29+
run: |
30+
EXIT_CODE=0
31+
for f in $(git --no-pager grep --full-name -I -l ''); do
32+
tail -c1 "$f" | read -r _ || echo "$f"
33+
tail -c1 "$f" | read -r _ || EXIT_CODE=1
34+
done
35+
exit $EXIT_CODE

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ docs/build
1212
venv
1313
*.pyc
1414
tmp
15-
gen_resources/build
15+
gen_resources/build

.markdownlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ MD026: false
1212

1313
# MD032 Lists should be surrounded by blank lines
1414
MD032: false
15+
16+
# MD033 Inline HTML
17+
MD033: false

gen_resources/generate.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ build_dir = joinpath(@__DIR__, "build")
1818

1919
artifact_file = joinpath(@__DIR__, "..", "Artifacts.toml")
2020

21-
generate(ARGS, sources, build_dir, artifact_file)
21+
generate(ARGS, sources, build_dir, artifact_file)

gen_resources/generator/components.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ function arg_docstring(prop_name, type_object, required, description, indent_num
185185
")",
186186
isempty(description) ? "" : string(": ", description)
187187
)
188-
end
188+
end

gen_resources/generator/dash.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ function components_module_resources(module_name; name, prefix, metadata_file)
157157
)
158158

159159
return meta
160-
end
160+
end

gen_resources/generator/deploy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ function upload_to_releases(repo_name, tag, tarball_path; attempts = 3)
152152
end
153153
end
154154
error("Unable to upload $(tarball_path) to GitHub repo $(repo_name) on tag $(tag)")
155-
end
155+
end

gen_resources/generator/generator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ function generate(ARGS, sources, build_dir, artifact_file)
8383
end
8484
@info "resource generation done!"
8585

86-
end
86+
end

0 commit comments

Comments
 (0)