-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup err-msg and match(ish) it with expected
- Loading branch information
Showing
3 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
use std::fmt; | ||
|
||
use derive_new::new; | ||
use relative_path::RelativePathBuf; | ||
|
||
#[derive(Clone, new)] | ||
pub struct ByNamePackegPrefixedWithNumber { | ||
#[new(into)] | ||
attribute_name: String, | ||
package_name: String, | ||
#[new(into)] | ||
relative_package_dir: RelativePathBuf, | ||
} | ||
|
||
impl fmt::Display for ByNamePackegPrefixedWithNumber { | ||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
let Self { attribute_name } = self; | ||
let Self { | ||
package_name, | ||
relative_package_dir, | ||
} = self; | ||
write!( | ||
f, | ||
r#"- pkgs.{attribute_name}: "Attribute names should not be number-prefixed. It is suggestet to `"`-wrap this name"# | ||
r#"- {relative_package_dir}: Attribute `{package_name}` should not be number-prefixed. It is suggestet to `"`-wrap this name"# | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
trace: This should be on stderr! | ||
@REDACTED@error: This is an error!@REDACTED@ | ||
- Nix evaluation failed for some package in `pkgs/by-name`, see error above | ||
- pkgs/by-name/_1/10foo: Attribute `10foo` should not be number-prefixed. It is suggestet to `"`-wrap this name | ||
This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. |