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
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test building commits

on:
push:
pull_request:


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
meson ninja-build valac \
libgtk-4-dev libadwaita-1-dev \
libgranite-7-dev libgee-0.8-dev \
libglib2.0-dev dbus-x11 libvala-0.56-dev\
libjson-glib-dev libjson-glib-1.0-0 \
gettext libgtksourceview-5-0 libgtksourceview-5-dev \
desktop-file-utils appstream dbus-x11

- name: Configure and Build Folio
run: |
meson setup builddir --prefix=/usr
meson compile -C builddir

- name: Run Tests
env:
GIO_USE_VFS: local
run: |
dbus-run-session -- meson test -C builddir --no-suite blueprint-compiler
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check commits for Lint errors

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
meson ninja-build valac \
libgtk-4-dev libadwaita-1-dev \
libgranite-7-dev libgee-0.8-dev \
libglib2.0-dev dbus-x11 libvala-0.56-dev libjson-glib-dev libjson-glib-1.0-0

- name: Build vala-lint
run: |
git clone https://github.com/elementary/vala-lint.git --depth 1
cd vala-lint
meson setup builddir --prefix=/usr
meson compile -C builddir
sudo meson install -C builddir
cd ..

- name: Lint Code
shell: bash
env:
GIO_USE_VFS: local
run: |
dbus-run-session -- io.elementary.vala-lint src/


9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: vala-lint
name: Vala-Lint
entry: env LD_LIBRARY_PATH=/usr/local/lib64 GIO_USE_VFS=local dbus-run-session -- io.elementary.vala-lint -c vala-lint.conf --fix .
language: system
files: \.(vala|gs)$

27 changes: 27 additions & 0 deletions vala-lint.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[Checks]
block-opening-brace-space-before=error
double-semicolon=error
double-spaces=error
ellipsis=error
line-length=warn
naming-convention=error
no-space=error
note=warn
space-before-paren=error
use-of-tabs=off
trailing-newlines=error
trailing-whitespace=error
unnecessary-string-template=error

[Disabler]
disable-by-inline-comments=true

[line-length]
max-line-length=120
ignore-comments=true

[naming-convention]
exceptions=UUID,

[note]
keywords=TODO,FIXME,