{"id":13441820,"url":"https://github.com/vala-lang/vala-lint","last_synced_at":"2025-10-26T07:19:04.645Z","repository":{"id":37959806,"uuid":"70204293","full_name":"vala-lang/vala-lint","owner":"vala-lang","description":"Check code-style of Vala code files","archived":false,"fork":false,"pushed_at":"2024-09-03T21:00:35.000Z","size":237,"stargazers_count":96,"open_issues_count":37,"forks_count":15,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-01-08T16:24:21.900Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Vala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vala-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-07T00:44:02.000Z","updated_at":"2024-11-03T01:07:27.000Z","dependencies_parsed_at":"2023-11-12T10:26:53.956Z","dependency_job_id":"568811e4-27a3-4ac0-857d-a0418ce084c9","html_url":"https://github.com/vala-lang/vala-lint","commit_stats":{"total_commits":89,"total_committers":22,"mean_commits":4.045454545454546,"dds":0.7640449438202247,"last_synced_commit":"923adb5d3983ed654566304284607e3367998e22"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vala-lang%2Fvala-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vala-lang%2Fvala-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vala-lang%2Fvala-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vala-lang%2Fvala-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vala-lang","download_url":"https://codeload.github.com/vala-lang/vala-lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240783111,"owners_count":19856776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-07-31T03:01:38.432Z","updated_at":"2025-10-26T07:19:04.638Z","avatar_url":"https://github.com/vala-lang.png","language":"Vala","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\u003ccenter\u003eVala-Lint\u003c/center\u003e\u003c/h1\u003e\n  \u003ch3 align=\"center\"\u003e\u003ccenter\u003eCheck Vala code files for code-style errors\u003c/center\u003e\u003c/h3\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/vala-lang/vala-lint/workflows/CI/badge.svg\" alt=\"CI\"\u003e\n  \u003cimg src=\"https://github.com/vala-lang/vala-lint/workflows/Publish/badge.svg\" alt=\"Publish\"\u003e\n\n  \u003ca href=\"https://hub.docker.com/r/valalang/lint\"\u003e\n   \u003cimg src=\"https://img.shields.io/docker/stars/valalang/lint\" alt=\"Dockerhub\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.bountysource.com/trackers/45980444-elementary-Vala-lint\"\u003e\n    \u003cimg src=\"https://www.bountysource.com/badge/tracker?tracker_id=45980444\" alt=\"Bountysource\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nSmall command line tool and library for checking Vala code files for code-style errors.\nBased on the [elementary Code-Style guidelines](https://docs.elementary.io/develop/writing-apps/code-style).\n\n\n## Building, Testing, and Installation\nYou'll need the following dependencies:\n\n    meson\n    gio-2.0\n    valac\n    json-glib-1.0\n\nRun meson build to configure the build environment. Change to the build directory and run ninja test to build and run automated tests\n\n    meson build --prefix=/usr\n    cd build\n    ninja test\n\nTo install, use ninja install, then execute with `io.elementary.vala-lint`\n\n    sudo ninja install\n    io.elementary.vala-lint\n\n\n## Usage\nYou can use vala-lint or its library to scan your files and projects easily. By default, you can lint every Vala file in the current directory and all subdirectories by\n\n    io.elementary.vala-lint\n\nAdditionally, vala-lint uses [globs](https://en.wikipedia.org/wiki/Glob_%28programming%29) to match files or directories. For example, you can lint every file in a given directory by\n\n    io.elementary.vala-lint ../my-project/test\n\nor specify particular files via\n\n    io.elementary.vala-lint ../my-project/test/unit-test.vala\n    io.elementary.vala-lint ../my-project/test/*-test.vala\n\nYou can automatically fix a certain class of issues by\n\n    io.elementary.vala-lint --fix ../my-project/test/*-test.vala\n\nTo list all options, type `io.elementary.vala-lint -h`. Additional command line flags are: `--print-end` for printing not only the start but also the end of a mistake, and `--exit-zero` to always return a 0 (non-error) status code, even if lint mistakes are found.\n\n### Configuration\nUsing a configuration file, you can overwrite the default settings of vala-lint. It can be included via the `config`-option\n\n    io.elementary.vala-lint -c vala-lint.conf\n\nA file of the default configuration can be generated and saved by\n\n    io.elementary.vala-lint --generate-config \u003e\u003e vala-lint.conf\n\nThe generated file will look like\n\n```Ini\n[Checks]\nblock-opening-brace-space-before=error\ndouble-semicolon=error\ndouble-spaces=error\nellipsis=error\nline-length=warn\nnaming-convention=error\nno-space=error\nnote=warn\nspace-before-paren=error\nuse-of-tabs=error\ntrailing-newlines=error\ntrailing-whitespace=error\nunnecessary-string-template=error\n\n[Disabler]\ndisable-by-inline-comments=true\n\n[line-length]\nmax-line-length=120\nignore-comments=true\n\n[naming-convention]\nexceptions=UUID\n\n[note]\nkeywords=TODO,FIXME\n```\n\nAs this is the default configuration, you only need to specifiy differing settings. In the *Checks* group, each check can have three states. Using *error* (the default), the rule is displayes in output and triggers an exit code, for *warn* it is shown in output without an exit code and for *off* the rule is completely silent. The *Disabler* group allows for disabling a single check at a specific line using an inline comment (see Disabling Errors below). Furthermore, each check can have individual, hopefully self-explanatory, settings, which are also listed in the [wiki](https://github.com/elementary/vala-lint/wiki/Vala-Lint-Checks).\n\n\n### Disabling Errors\nYou can disable a single or multiple errors on a given line by adding an inline comment like\n\n```vala\nif(...) { // vala-lint=space-before-paren, line-length\n```\n\nIf you want to skip an entire file, you can use\n\n```vala\n// vala-lint=skip-file\n```\n\nat the beginning of the file.\n\n### Ignoring Files\nYou can disable linting of files matching certain patterns by creating a `.valalintignore` text file.\nIf the file is created in your home directory it will be applied globally.\nThe patterns must be like those used for globbing filenames. Type `man glob` into a terminal\nfor further information.\n\nIf the file is created in the root directory of your project it will apply only to that project and\nwill override any global setting.\nIf no `.valalintignore` file is found then the patterns in any `.gitignore` file found in the\nproject root are ignored.\n\nThe format of the file is one pattern per line. Usually you would want to ignore certain folders like\n\n```vala\nbuild\npo\ndata\n```\n\nNote that if you do provide a `.valalintignore` file, you must repeat any patterns in a `.gitignore`\nfile that you do not want to lint.\n\nAlthough `vala-lint` ignores non-Vala files, ignoring large directories significantly speeds up linting.\n\nYou may also ignore specific kinds of `.vala` files like\n```vala\n~*.vala\n```\n\n### Docker and Continuous Integration\nVala-Lint is primarily intended to be used in Continuous Integration (CI). It's available in a convenient, always up-to-date Docker container `valalang/lint:latest` hosted on Docker Hub.\n\n    docker run -v \"$PWD\":/app valalang/lint:latest\n\n### pre-commit Integration\nYou can use Vala-Lint via [pre-commit](https://pre-commit.com/) by adding the following entry to your `.pre-commit-config.yaml`:\n\n```yaml\n- repo: https://github.com/vala-lang/vala-lint\n  rev: master\n  hooks:\n  - id: vala-lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvala-lang%2Fvala-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvala-lang%2Fvala-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvala-lang%2Fvala-lint/lists"}