https://github.com/fernando24164/rust-linter
A small linter for Marathon config files
https://github.com/fernando24164/rust-linter
linter rust
Last synced: 3 months ago
JSON representation
A small linter for Marathon config files
- Host: GitHub
- URL: https://github.com/fernando24164/rust-linter
- Owner: fernando24164
- Created: 2021-08-17T09:21:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T09:22:56.000Z (almost 4 years ago)
- Last Synced: 2025-01-28T02:44:22.677Z (5 months ago)
- Topics: linter, rust
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust linter
A small linter project made with Rust. Just for learning purposes 📖📓📚🎓
## Table of Contents
- [About](#about)
- [Getting Started](#getting_started)
- [Usage](#usage)A small linter to detect extra commas in Marathon templates files
Some cases your text editor can add extra commas to last line in configuration like this.
```
{
"id": "basic-0",
"cmd": "while [ true ] ; do echo 'Hello Marathon' ; sleep 5 ; done",
"cpus": 0.1,
"mem": 10.0,
"instances": 1,
}
```To check it, I made this naive linter in Rust
```
rust-linter
```This will return the exact line with extra comma
```
"Error in line 6, extra comma"
```### Prerequisites
Install Rust in your computer
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```### Installing
Installing in Linux
```
cargo test
cargo build --release
cp rust-linter /usr/local/bin
chmod +x /usr/local/bin/rust-linter
``````
rust-linter
```