Skip to content

ci: improve linting #377

ci: improve linting

ci: improve linting #377

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
linux:
name: Static linting
runs-on: ubuntu-24.04
steps:
- name: Install prerequisites
run: |
packages=(
clang-tidy
cppcheck
jq
libfreetype-dev
libfribidi-dev
libharfbuzz-dev
libjpeg-turbo8-dev
libnanosvg-dev
libstb-dev
libunibreak-dev
libutf8proc-dev
libxml2-utils
parallel
)
sudo apt-get update && sudo apt-get install --no-install-recommends "${packages[@]}"
# We need a more recent version of libunibreak for `lb_get_char_class` support.
wget http://ftp.debian.org/debian/pool/main/libu/libunibreak/libunibreak{6,-dev}_6.1-2_amd64.deb
sudo dpkg -i *.deb
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lint
run: .ci/script.sh
# NPM tests
- name: Uses Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
# No cache, there are complaints about lockfiles that we don't want otherwise. See <https://github.com/actions/setup-node/issues/928>.
# cache: 'npm'
- run: npm init --yes && npm install stylelint stylelint-config-standard
- name: Check CSS syntax (only epub.css, html5.css and fb2.css)
run: npx stylelint cr3gui/data/epub.css cr3gui/data/html5.css cr3gui/data/fb2.css