Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

A Rust linter that provides various suggestions based on the new primitives offered in the `gazebo` library.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

facebookincubator/gazebo_lint

This project is archived

gazebo-lint included lints aiming at:

  • make writing code easier for Rust newcomers
  • enforce certain code patterns in buck2 project
  • enforce recommended patterns using gazebo library

This lint relies heavily on rust compiler internals, it is expensive to maintain, so we decided to archive it.

Gazebo Lint - a linter for patterns relating to the Gazebo Library

GitHub link crates.io version Build status

The linter provides various helpful hints relating to additions from the Gazebo Library.

For example, Gazebo added Dupe. This linter will provide hints to use dupe instead of clone. e.g. when doing Arc::new(x).clone(). Other available hints are to "Use map" when doing xs.iter().map(f).collect() if the types line up, and reminders to derive Dupe when appropriate.

Using Gazebo Lint

Gazebo lint can lint any program by adding the following to lib.rs:

#![feature(plugin)]
#![allow(deprecated)]
#![plugin(linter)]

Unfortunately the plugin feature is deprecated, so while useful, it is likely that linter will stop working at some point in the future. We will look to update the linter to use the proper alternatives if applicable when that becomes an issue.

Making a release

  1. Check the GitHub Actions are green.
  2. Update CHANGELOG.md with the changes since the last release. This link can help (update to compare against the last release).
  3. Update the version numbers of the Cargo.toml file in gazebo_lint. Bump them by 0.0.1 if there are no incompatible changes, or 0.1.0 if there are.
  4. Run cargo publish --allow-dirty --dry-run, then without the --dry-run in gazebo_lint directory.
  5. Create a GitHub release with v0.X.Y, using the gazebo_lint version as the name.

License

Gazebo Linter is both MIT and Apache License, Version 2.0 licensed, as found in the LICENSE-MIT and LICENSE-APACHE files.

About

A Rust linter that provides various suggestions based on the new primitives offered in the `gazebo` library.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 12

Languages