Ackee-Blockchain / trident

Rust-based framework to Fuzz and Integration test Solana programs to help you ship secure code.
https://ackee.xyz/
MIT License
187 stars 18 forks source link

trident init updates .gitignore file by appending in the same line #186

Closed hetdagli234 closed 2 weeks ago

hetdagli234 commented 1 month ago

On running trident init fuzz, the .gitignore file is updated by appending the trident-tests/fuzz_tests/fuzzing/hfuzz_target in the same line.

It should ideally be added in the new line. This caused an issue as now git does not ignore the previous and new trident line.

st22nestrel commented 4 weeks ago

I would like to know how exactly is this an issue? As I do not know how to reproduce your problem, could you please describe exact steps how to reproduce it, so I can look into it? :slightly_smiling_face:

hetdagli234 commented 4 weeks ago

On running trident init on an anchor program .gitignore file is updated like this: *wallet.jsontrident-tests/fuzz_tests/fuzzing/hfuzz_target ideally the folders trident wants to ignore should be added in a new line but it appends in the same line. As you can see above *wallet.json is no longer ignored for me now, nor are the trident-tests.

st22nestrel commented 4 weeks ago

Ok, now I get your problem, your .gitignore file does not end with newline, and that is why the current version of trident produces malformed .gitignore. I could not reproduce your problem right away because after running anchor init <project-name>, my .gitignore has the needed newline. I am using anchor-0.30.1 on Ubuntu 24.04 LTS.

Maybe your version of anchor does not append newline at the end of .gitignore which is probably not the case and it is likely more related to your OS or IDE setting. Nevertheless, trident should update .gitignore without need for manual adjustments.

Just for curiosity, what OS and IDE are you using?

hetdagli234 commented 4 weeks ago

I am using MacOS Sonoma 14.5 and Cursor as my IDE which is VS code based.