question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tracking of ignored files showing false positives.

See original GitHub issue

Received notice that

Ignored files found that are tracked: .ignore plugin found some files that are tracked with Git which are also listed in .gitignore file.

However, the file being highlighted is gradle-wrapper.jar which is in my .gitignore file as this:

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

Earlier I also noticed that log4j2.properties file which is in my build folder was similarly being marked. It is of course included in git in the main project, and my build folder is added to .gitignore, so this rule seems a little confused.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
hszcommented, Jun 5, 2017

@rscorer @akomelj @bamapookie @SUPERCILEX @HeadOnAPlate @bamapookie @pbienick Thank you guys for this feedback.

I finally was able to resolve this issue (mostly with reimplementing the indexing part). The main issue that caused this bug was wrongly handled files excluding with ! at the beginning (it was commited to #350).

This fix will be released with v2.0.0 as soon as I’ll take care of the other issues (I’m back on track for last 2 weeks).

CC @cjbarth @pvannuff @bamapookie @Hronom

2reactions
rscorercommented, Feb 16, 2017

Interesting, I thought I’d try something quickly - and apparently its all git’s fault.

If I edit my .gitignore I can avoid this issue…

Previously:

$ cat .gitignore
...
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
...
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

...

$ git ls-files --ignored --exclude-standard
gradle/wrapper/gradle-wrapper.jar
$

Edited, I end up with this:

$ cat .gitignore
...
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

...

$ git ls-files --ignored --exclude-standard
$ 

Previously the Avoid line was placed before the *.jar line

So the order is apparently very important

(Hope that makes sense)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Address false positives/negatives in Microsoft Defender for ...
In the Microsoft 365 Defender portal, in the navigation pane, under Email & collaboration, select Exchange message trace. Select a message to ...
Read more >
Common CSF/LFD False Positives and How to Stop The ...
Ignoring Processes Via WHM ... Locate and click “csf.pignore – Process Tracking” if you are using an older version of CSF/LFD. If your...
Read more >
Git - Ignore a File Based on its Content - Stack Overflow
1 Answer 1 ... There is not a way in git to create content-based ignore rules. You can sort of approximate it. ......
Read more >
Files added to .gitignore are still shown in commit changes
gitignore file in the project root directory to ignore some files when I'm committing changes. But the problem is when I click commit...
Read more >
Findings - Semgrep
Findings that are ignored are present in the code, but have been labeled as unimportant. Ignore findings that are false positives or deprioritized...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found