Skip to content

Commit 24f9504

Browse files
authored
updated to rust 1.64.0 (#7)
1 parent 1e6afd4 commit 24f9504

File tree

8 files changed

+17
-10
lines changed

8 files changed

+17
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
5959
# alternatively matrix could be shared and specified via .json
6060
# see https://github.community/t/how-to-share-matrix-between-jobs/128595/8
6161
# ---
62-
- { build: 'linux-x86_64-pinned', os: 'ubuntu-18.04', target: 'x86_64-unknown-linux-gnu', cross: false, rust: 1.62.0 }
63-
- { build: 'windows-x86_64-pinned', os: 'windows-2019', target: 'x86_64-pc-windows-msvc', cross: false, rust: 1.62.0 }
64-
- { build: 'macos-x86_64-pinned', os: 'macos-latest', target: 'x86_64-apple-darwin', cross: false, rust: 1.62.0 }
62+
- { build: 'linux-x86_64-pinned', os: 'ubuntu-18.04', target: 'x86_64-unknown-linux-gnu', cross: false, rust: 1.64.0 }
63+
- { build: 'windows-x86_64-pinned', os: 'windows-2019', target: 'x86_64-pc-windows-msvc', cross: false, rust: 1.64.0 }
64+
- { build: 'macos-x86_64-pinned', os: 'macos-latest', target: 'x86_64-apple-darwin', cross: false, rust: 1.64.0 }
6565
- { build: 'linux-x86_64', os: 'ubuntu-latest', target: 'x86_64-unknown-linux-gnu', cross: false, rust: stable }
6666
- { build: 'linux-i686', os: 'ubuntu-latest', target: 'i686-unknown-linux-gnu', cross: true, rust: stable }
6767
- { build: 'linux-arm', os: 'ubuntu-latest', target: 'aarch64-unknown-linux-gnu', cross: true, rust: stable } # aarch64

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "run-clang-tidy"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["Martin Lampacher <[email protected]>"]
55
description = """
66
Cross platform CLI wrapper for executing clang-tidy based paths or globs specified

src/cli/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@ pub struct JsonModel {
5151
pub name: String,
5252
}
5353

54+
// goal: have compatible .json configuration files for clang-format and clang-tidy
55+
// it should be possible to specify all command line options and non-unit relative paths
56+
// using the command line, such that they can be set using ENV variables
57+
5458
#[derive(Debug)]
5559
pub struct Data {
5660
/// Json input data
5761
pub json: JsonModel,
5862
/// Command-line override for the tidy file
5963
pub tidy_file: Option<path::PathBuf>,
64+
// TODO: add tidy_root override
6065
/// Command-line override for the build root folder
6166
pub build_root: Option<path::PathBuf>,
6267
/// Command-line override for the clang-tidy executable

src/cli/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ where
148148
let is_file = path
149149
.as_ref()
150150
.file_name()
151-
.and_then(|file_name| (path.as_ref().as_os_str() == file_name).then(|| true))
151+
.and_then(|file_name| (path.as_ref().as_os_str() == file_name).then_some(true))
152152
.is_some();
153153

154154
if is_file {

src/lib/globs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ pub fn build_glob_set_from<'a>(
4848
}
4949

5050
pub fn match_paths<P>(
51-
candidates: Vec<globmatch::Matcher<P>>,
52-
filter: Option<Vec<globmatch::GlobSet>>,
53-
filter_post: Option<Vec<globmatch::GlobSet>>,
51+
candidates: Vec<globmatch::Matcher<'_, P>>,
52+
filter: Option<Vec<globmatch::GlobSet<'_>>>,
53+
filter_post: Option<Vec<globmatch::GlobSet<'_>>>,
5454
) -> (Vec<path::PathBuf>, Vec<path::PathBuf>)
5555
where
5656
P: AsRef<path::Path>,

src/lib/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ mod tests {
269269
let is_file = path
270270
.path
271271
.file_name()
272-
.and_then(|file_name| (path.path.as_os_str() == file_name).then(|| file_name))
272+
.and_then(|file_name| (path.path.as_os_str() == file_name).then_some(file_name))
273273
.is_some();
274274

275275
assert_eq!(path.is_file, is_file);

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(rust_2018_idioms)]
2+
13
pub mod cli;
24
pub mod cmd;
35
mod lib;

0 commit comments

Comments
 (0)