Skip to content

Commit

Permalink
Check for respect_gitignore from root config
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed Jul 15, 2024
1 parent ecd6865 commit cb87b15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/ruff_server/src/session/index/ruff_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl RuffSettings {
impl RuffSettingsIndex {
pub(super) fn new(root: &Path, editor_settings: &ResolvedEditorSettings) -> Self {
let mut index = BTreeMap::default();
let mut respect_gitignore = true;

// Add any settings from above the workspace root.
for directory in root.ancestors() {
Expand All @@ -112,6 +113,7 @@ impl RuffSettingsIndex {
continue;
};

respect_gitignore = settings.file_resolver.respect_gitignore;
index.insert(
directory.to_path_buf(),
Arc::new(RuffSettings {
Expand All @@ -127,7 +129,7 @@ impl RuffSettingsIndex {

// Add any settings within the workspace itself
let mut builder = WalkBuilder::new(root);
builder.standard_filters(true);
builder.standard_filters(respect_gitignore);
builder.hidden(false);
builder.threads(
std::thread::available_parallelism()
Expand Down

0 comments on commit cb87b15

Please sign in to comment.