| Crates.io | alpm-lint |
| lib.rs | alpm-lint |
| version | 0.3.1 |
| created_at | 2025-10-30 20:56:21.672511+00 |
| updated_at | 2026-01-11 16:23:44.112564+00 |
| description | Library and command line interface for linting of ALPM packaging related files and projects |
| homepage | https://alpm.archlinux.page |
| repository | https://gitlab.archlinux.org/archlinux/alpm/alpm |
| max_upload_size | |
| id | 1908959 |
| size | 265,247 |
This project provides a binary for all linting purposes in the scope of the ALPM project.
All lints and their respective documentation can be found on the central ALPM lints website.
The alpm-lint binary provides help output for all of its commands.
Documentation about individual lints and used options can be found on the ALPM lints website.
alpm-lint can be run directly in any package source repository or package directory with alpm-lint check, which will automatically run all applicable lints.
You can check individual files with alpm-lint check $PATH_TO_FILE.
If the targeted file does not use its canonical name, you can explicitly specify the scope with --scope. For example: alpm-lint check --scope source-info my.srcinfo.
The alpm-lint project is not designed to be used as a library.
Hence, there're now backwards/forwards compatibility guarantees for internal types and APIs.
New lint rules may be added at any point in time and lint rules may be gracefully removed as well.
Exposed data such as JSON/TOML output, however, is of course considered a part of our external API and we'll uphold backwards compatibility and follow the best practices of semantic versioning.
The following example takes a SRCINFO file with duplicate architecture declarations and performs a lint on it.
cat > "$TEMP_TEST_DIR/.SRCINFO" << EOF
pkgbase = example
pkgver = 1.0.0
epoch = 1
pkgrel = 1
arch = x86_64
# A second identical architecture declaration to trigger a lint rule.
arch = x86_64
pkgname = example
EOF
cd $TEMP_TEST_DIR;
alpm-lint check > $TEMP_TEST_DIR/output
cat > "$TEMP_TEST_DIR/expected" <<EOF
warning[source_info::duplicate_architecture]
--> in field 'arch'
|
| Found duplicate architecture: x86_64
|
help: Architecture lists for packages should always be unique.
Duplicate architecture declarations such as \`arch=(x86_64 x86_64)\` are ignored.
= alpm-architecture specification: https://alpm.archlinux.page/specifications/alpm-architecture.7.html
= see: https://alpm.archlinux.page/lints/index.html#source_info::duplicate_architecture
EOF
Please refer to the contribution guidelines and the architectural guide to learn how to contribute to this project.
This project can be used under the terms of the Apache-2.0 or MIT. Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.