ci tests rustfmt, but rustfmt doesn't test ci - #7044
Conversation
What does this mean? CI is green. Are you saying that there's a formatting error that we're not catching? |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
it works after your suggestion
no |
Not directly related to this change (i.e. the issue exists on /rustfmt$ cargo build
/rustfmt$ cd ./check_diff
/rustfmt/check_diff$ RUSTFMT=../target/debug/rustfmt cargo fmt --check
Diff in /home/mjh/src/rustfmt/check_diff/tests/check_diff.rs:1:
use check_diff::{
- CheckDiffError, DiffChecker, CodeFormatter, FormatCodeError, Repository,
- RustFmtFileFinder, check_diff,
+ CheckDiffError, CodeFormatter, DiffChecker, FormatCodeError, Repository, RustFmtFileFinder,
+ check_diff,
};
use std::fs::File;
use tempfile::Builder; |
|
@matthewhughes934 because we are only checking files of src folder in external_crate Lines 489 to 506 in 1191d91 This fixes the external_crate/tests/ directory: |
|
@rustbot ready |
|
@AsthaMishra has the test directory issue been fixed? We should probably just take care of that in this PR too. |
|
@ytmimi yes, pushed |
| files.push(file); | ||
| } | ||
|
|
||
| let mut tests_files = get_test_files(&PathBuf::from(external_crate).join("tests"), false); |
There was a problem hiding this comment.
I think it would be fine for us to recursively look for .rs files within the "tests" directory of check_diff, config_proc_macro, and ci since those test files don't have a special structure to them like tests/source and tests/target do for the rustfmt test suite.
@ytmimi your suggestion works. Confirmed: before adding "ci" to external_crates, self_tests passed even with pub fn run_command_with_env<I, S>( in ci/src/common.rs. After the change it fails with a mismatch on that line.
fixes : #7039