{"id":13648507,"url":"https://github.com/rust-marker/marker","last_synced_at":"2025-04-22T11:32:45.571Z","repository":{"id":37562912,"uuid":"464439924","full_name":"rust-marker/marker","owner":"rust-marker","description":"An experimental linting interface for Rust. Let's make custom lints a reality","archived":false,"fork":false,"pushed_at":"2023-12-31T19:25:58.000Z","size":2382,"stargazers_count":148,"open_issues_count":56,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-10T23:15:32.349Z","etag":null,"topics":["linting","rust","rust-marker"],"latest_commit_sha":null,"homepage":"https://rust-marker.github.io/marker/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-marker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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":"2022-02-28T10:39:01.000Z","updated_at":"2025-03-24T14:04:57.000Z","dependencies_parsed_at":"2024-11-09T23:40:28.459Z","dependency_job_id":null,"html_url":"https://github.com/rust-marker/marker","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-marker%2Fmarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-marker%2Fmarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-marker%2Fmarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-marker%2Fmarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-marker","download_url":"https://codeload.github.com/rust-marker/marker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232380,"owners_count":21396628,"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":["linting","rust","rust-marker"],"created_at":"2024-08-02T01:04:18.839Z","updated_at":"2025-04-22T11:32:44.630Z","avatar_url":"https://github.com/rust-marker.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eMarker\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg height=200 src=\"./res/marker-logo-round.svg\" alt=\"Marker logo\" /\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n[![Crates.io](https://img.shields.io/crates/v/marker_api.svg)](https://crates.io/crates/marker_api)\n[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/marker_api.svg)](#license)\n\nMarker is an experimental code analysis interface, with the goal to create a stable and user-friendly linting framework for the Rust programming language. Creating custom lints should be a straightforward process, and using them should be as simple as declaring a new dependency.\n\nLet's make custom lints and code analysis a reality!\n\n\u003e **Note**\n\u003e\n\u003e The project is in the early stages of development, some things are still missing and the API is still unstable.\n\u003e\n\u003e A collection of features, goals and current limitations is available below.\n\n## Features\n\n* **Custom Lints**: Marker offers a framework for everyone to create and provide custom lints, allowing you to automatically improve the code quality for you and users of your crate.\n* **User-Friendly Interface**: Marker provides a new subcommand for [Cargo] that does all the heavy lifting for you. [cargo_marker] can automatically set up a driver for linting, compile lint crates and run them on any project.\n* **Driver Independent**: Every code analysis requires a driver that parses the code and provides further information. Marker's API is designed to be driver-independent, allowing it to support future compilers and potentially IDEs. (Currently, [rustc] is the only available driver).\n* **CI ready**: Marker provides pre-compiled binaries, installation scripts, and a GitHub Action to make CI usage easy.\n\nAnd more to come, see Marker's goals and limitations below.\n\n[cargo_marker]: https://crates.io/crates/cargo_marker\n[rustc]: https://github.com/rust-lang/rust/\n[Cargo]: https://github.com/rust-lang/cargo\n\n## Usage\n\nThe following is an abbreviated guide. Check out [The Marker Book] for detailed instructions and additional information.\n\n[The Marker Book]: https://rust-marker.github.io/marker/book\n\n### Installation\n\n#### Download pre-compiled binaries (recommended)\n\n\u003c!-- Please keep this section in sync with the docs/book/src/usage/installation.md --\u003e\n\nWe provide pre-compiled binaries for the mainstream platforms. See the list of available artifacts in our [Github Releases](https://github.com/rust-marker/marker/releases/latest).\n\nSelect one of the installation scripts below according to your platform. The script will install the required Rust toolchain dependency on your machine, download the current version of `cargo-marker` CLI, and the internal driver.\n\n\u003c!-- region replace marker version stable --\u003e\n\n**Linux or MacOS (Bash)**:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/rust-marker/marker/v0.5/scripts/release/install.sh | bash\n```\n\n**Windows (PowerShell)**:\n```ps1\ncurl.exe -fsSL https://raw.githubusercontent.com/rust-marker/marker/v0.5/scripts/release/install.ps1 | powershell -command -\n```\n\nThe provided scripts use a sliding git tag `v0.5`, to allow for automatic patch version updates, however a fixed tag `v0.5.0` is also available.\n\n\u003c!-- endregion replace marker version stable --\u003e\n\nIf you are on a platform that isn't supported yet by the pre-compiled binaries, then you should fall back to building from sources as described below.\n\n#### Build from sources\n\n```sh\ncargo install cargo_marker\n\n# Automatically setup the toolchain and build driver from sources\ncargo marker setup --auto-install-toolchain\n```\n\n### CI usage\n\nMarker provides a Github Action that downloads the pre-compiled binaries and runs `cargo marker`.\n\n\u003c!-- region replace marker version stable --\u003e\n\n```yml\n- uses: rust-marker/marker@v0.5\n```\n\nIf you want to only install Marker, and not run it, there is an option for that.\n\n```yml\n- uses: rust-marker/marker@v0.5\n  with:\n    install-only: true\n\n# `cargo marker` command should be available at this point\n- run: cargo marker --version\n```\n\nSee [The Marker Book] for more details and examples of workflows.\n\n\u003c!-- endregion replace marker version stable --\u003e\n\n### Specifying lints\n\nMarker requires lint crates to be specified. The best way is to add them to the `Cargo.toml` file, like this:\n\n\u003c!-- region replace marker version stable --\u003e\n```toml\n[workspace.metadata.marker.lints]\n# A local crate as a path\nmarker_lints = { path = './marker_lints' }\n# An external crate via git\nmarker_lints = { git = \"https://github.com/rust-marker/marker\" }\n# An external crate from a registry\nmarker_lints = \"0.5.0\"\n```\n\u003c!-- endregion replace marker version stable --\u003e\n\n### Making Your Own Lints\n\nYou can create your own lint crates if you want, the [lint-crate-template] has all the basics for you to get started writing your own lints.\n\n[lint-crate-template]: https://github.com/rust-marker/lint-crate-template\n\n### Running Marker\n\nRunning Marker is as simple as running its sibling *[Clippy]*. Navigate to your Rust project directory and run the following command:\n\n```sh\ncargo marker\n```\n\nThis will initialize Marker, compile the lint crates and start linting.\n\n[Clippy]: https://github.com/rust-lang/rust-clippy\n\n## Goals\n\n* **Stability**: Marker's API design focuses on stability and extendability. The goal is to archive backwards compatibility, so that any lint, written after version 1.0.0, will compile and continue to work for years to come.\n* **Usability**: Marker's API focuses on usability, where possible under the constraints of Marker's stability guarantees. Types follow common design patterns and naming conventions, allowing you to focus on the lint logic directly.\n* **Be A Foundation**: Marker wants to be a foundation for new tools which make linting even easier, provide deeper code analysis capabilities and allow for automated migrations.\n\n\u003c!-- FIXME(xFrednet): Update the link to link to `crates.io` once the first version was released--\u003e\n[marker_api]: https://github.com/rust-marker/marker/tree/master/marker_api\n\n## Limitations\n\nMarker is still growing up, and that's a good thing. We can still shape the API and adapt it to what the user needs. However, this and the fact that Marker is not an official Rust project comes with some limitations:\n\n* **Nightly**: Internally, Marker has to rely on nightly versions of rustc. However, you, as an end-user, should not notice this dependency.\n* **AST Limitations**: Marker's API is still missing a few elements to represent everything required for linting. The API is still incomplete when it comes to:\n    * Higher order types\n    * Attributes [#51](https://github.com/rust-marker/marker/issues/51)\n    * Macros [rust-marker/design#47](https://github.com/rust-marker/design/issues/47)\n* **Utility**: The API is currently lacking a lot of utility functions, to handle edge cases and make linting more pleasant.\n* **Documentation**: Marker still requires a lot of documentation, in the form of doc comments and a book, which explains the basic concept and works as a guide for end-users, lint- and marker-devs alike.\n\n[crates.io]: https://crates.io/\n\n## Development Timeline\n\n1. Improve documentation and conduct user tests.\n2. Update and expand the API to incorporate feedback.\n3. Work on the AST Limitations mentioned above.\n4. Create more example lints.\n\nThe used nightly version will be updated every 6 weeks, when a new version of Rust is released.\n\n## Contributing\n\nContributions are highly appreciated! If you encounter any issues or have suggestions for improvements, please don't hesitate to [open an issue]. If you have an idea for a lint you want to implement with Marker, please share it by creating a [user story].\n\nStill reading? Interested in helping out? Wonderful! Check out Marker's [contributor documentation]\n\n[open an issue]: https://github.com/rust-marker/marker/issues/new\n[user story]: https://github.com/rust-marker/design/issues/new?template=user-story.md\n[contributor documentation]: ./CONTRIBUTING.md\n\n## License\n\nCopyright (c) 2022-2023 Rust-Marker\n\nRust-marker is distributed under the terms of the MIT license or the Apache License (Version 2.0).\n\nSee [LICENSE-APACHE](https://github.com/rust-marker/marker/blob/master/LICENSE-APACHE), [LICENSE-MIT](https://github.com/rust-marker/marker/blob/master/LICENSE-MIT).\n\n### Credit\n\nMarker is inspired and contains code snippets from [rustc], [Clippy] and [the Rust Reference]. These projects are dual-licensed under the Apache 2.0 and MIT licenses. See [`./COPYRIGHT.md`](./COPYRIGHT.md)\n\n[rustc]: https://github.com/rust-lang/rust\n[Clippy]: https://github.com/rust-lang/rust-clippy\n[the Rust Reference]: https://github.com/rust-lang/reference/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-marker%2Fmarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-marker%2Fmarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-marker%2Fmarker/lists"}