Skip to content

Commit

Permalink
cache: tweak generated .gitignore (astral-sh#10226)
Browse files Browse the repository at this point in the history
- Add a notice that this file was generated by ruff

 - Add a trailing newline
  • Loading branch information
dspicher authored and nkxxll committed Mar 10, 2024
1 parent b0cff02 commit ca53c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ pub(crate) fn init(path: &Path) -> Result<()> {
let gitignore_path = path.join(".gitignore");
if !gitignore_path.exists() {
let mut file = fs::File::create(gitignore_path)?;
file.write_all(b"*")?;
file.write_all(b"# Automatically created by ruff.\n*\n")?;
}

Ok(())
Expand Down

0 comments on commit ca53c50

Please sign in to comment.