Skip to content
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
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[*.sh]
# like -i=4
indent_style = space
indent_size = 4

# --language-variant
shell_variant = posix
binary_next_line = true
# --case-indent
switch_case_indent = true
space_redirects = true
keep_padding = true
# --func-next-line
function_next_line = true

[thirdparty/**]
ignore = true

[thirdparty_unman/**]
ignore = true

[android/gradlew]
ignore = true
41 changes: 41 additions & 0 deletions .github/workflows/check-shellscripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: check-shellscripts

on:
push:
branches:
- main
pull_request:

jobs:
shellcheck:
name: Check shellscripts by shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4

- name: Check shellscripts by shellcheck
uses: ludeeus/[email protected]
with:
ignore_paths: >-
thirdparty
thirdparty_unman

shfmt:
name: Check shellscript formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4

- name: Install Golang
uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true

- name: Install shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest

- name: Check shellscripts by shfmt
run: shfmt -d .
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Sourceforge repository will be used as a mirror
[![Join the chat at https://gitter.im/coolreader/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/coolreader/Lobby)


[![shell-lint](https://github.com/buggins/coolreader/workflows/check-shellscripts/badge.svg?branch=master)](https://github.com/buggins/coolreader/actions?query=workflow%3Acheck-shellscripts+branch%3Amaster)


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Expand Down