Skip to content

Commit

Permalink
[Rust] Add variants for short message formats (#4006)
Browse files Browse the repository at this point in the history
Closes #4004

I've added some variants for building, running, and checking using Rust's short message format, which gives a nicer inline error than Rust's default output.

I'm not familiar with the conventions of this codebase though around naming, preferred use of regex features etc, so if it's easier to just redo this in a more idiomatic way than it is to explain it then feel free to close 🙂
  • Loading branch information
KodrAus authored Jul 13, 2024
1 parent b319768 commit 634bebb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Rust/Cargo.sublime-build
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@
"cmd": ["cargo", "run"],
"name": "Run"
},
{
"cmd": ["cargo", "run", "--message-format", "short"],
"file_regex": "^([^:]*):([0-9]*):([0-9]*):\\s*(.*)",
"name": "Run (Short)"
},
{
"cmd": ["cargo", "test"],
"name": "Test"
},
{
"cmd": ["cargo", "test", "--message-format", "short"],
"file_regex": "^([^:]*):([0-9]*):([0-9]*):\\s*(.*)",
"name": "Test (Short)"
},
{
"cmd": ["cargo", "bench"],
"name": "Bench"
Expand All @@ -27,5 +37,19 @@
"cmd": ["cargo", "clippy"],
"name": "Clippy"
},
{
"cmd": ["cargo", "clippy", "--message-format", "short"],
"file_regex": "^([^:]*):([0-9]*):([0-9]*):\\s*(.*)",
"name": "Clippy (Short)"
},
{
"cmd": ["cargo", "check", "--all-targets"],
"name": "Check"
},
{
"cmd": ["cargo", "check", "--all-targets", "--message-format", "short"],
"file_regex": "^([^:]*):([0-9]*):([0-9]*):\\s*(.*)",
"name": "Check (Short)"
},
]
}

0 comments on commit 634bebb

Please sign in to comment.