mirror of
https://github.com/orhun/git-cliff.git
synced 2024-11-29 05:02:08 +03:00
chore(ci): update pedantic lint command (#890)
* chore(ci): update pedantic lint command * refactor(clippy): Fix basic clippy lints (new version) * chore(ci): Try multiple lines on yml way * chore(ci): format ci.yml
This commit is contained in:
parent
58dc1087ed
commit
8d10edb745
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -98,7 +98,25 @@ jobs:
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --tests --verbose -- -W clippy::pedantic
|
||||
args: >
|
||||
--all-targets --verbose -- -W clippy::pedantic
|
||||
-A clippy::needless_raw_string_hashes
|
||||
-A clippy::unreadable_literal
|
||||
-A clippy::redundant_else
|
||||
-A clippy::items_after_statements
|
||||
-A clippy::missing_errors_doc
|
||||
-A clippy::module_name_repetitions
|
||||
-A clippy::uninlined_format_args
|
||||
-A clippy::manual_string_new
|
||||
-A clippy::must_use_candidate
|
||||
-A clippy::too_many_lines
|
||||
-A clippy::wildcard_imports
|
||||
-A clippy::missing_panics_doc
|
||||
-A clippy::inefficient_to_string
|
||||
-A clippy::redundant_closure_for_method_calls
|
||||
-A clippy::map_unwrap_or
|
||||
-A clippy::struct_excessive_bools
|
||||
-A clippy::unnecessary_wraps
|
||||
|
||||
rustfmt:
|
||||
name: Formatting
|
||||
|
@ -137,32 +137,32 @@ impl Repository {
|
||||
(Some(include_pattern), Some(exclude_pattern)) => {
|
||||
// check if the commit has any changed files that match any of the
|
||||
// include patterns and non of the exclude patterns.
|
||||
return changed_files.iter().any(|path| {
|
||||
changed_files.iter().any(|path| {
|
||||
include_pattern
|
||||
.iter()
|
||||
.any(|pattern| pattern.matches_path(path)) &&
|
||||
!exclude_pattern
|
||||
.iter()
|
||||
.any(|pattern| pattern.matches_path(path))
|
||||
});
|
||||
})
|
||||
}
|
||||
(Some(include_pattern), None) => {
|
||||
// check if the commit has any changed files that match the include
|
||||
// patterns.
|
||||
return changed_files.iter().any(|path| {
|
||||
changed_files.iter().any(|path| {
|
||||
include_pattern
|
||||
.iter()
|
||||
.any(|pattern| pattern.matches_path(path))
|
||||
});
|
||||
})
|
||||
}
|
||||
(None, Some(exclude_pattern)) => {
|
||||
// check if the commit has at least one changed file that does not
|
||||
// match all exclude patterns.
|
||||
return changed_files.iter().any(|path| {
|
||||
changed_files.iter().any(|path| {
|
||||
!exclude_pattern
|
||||
.iter()
|
||||
.any(|pattern| pattern.matches_path(path))
|
||||
});
|
||||
})
|
||||
}
|
||||
(None, None) => true,
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ impl Template {
|
||||
Ok(v)
|
||||
}
|
||||
Err(e) => {
|
||||
return if let Some(source1) = e.source() {
|
||||
if let Some(source1) = e.source() {
|
||||
if let Some(source2) = source1.source() {
|
||||
Err(Error::TemplateRenderDetailedError(
|
||||
source1.to_string(),
|
||||
@ -182,7 +182,7 @@ impl Template {
|
||||
}
|
||||
} else {
|
||||
Err(Error::TemplateError(e))
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user