requirements icon indicating copy to clipboard operation
requirements copied to clipboard

Non requirements.txt text files getting inspected for requirements syntax

Open banagale opened this issue 4 years ago • 6 comments

Describe the bug Files that are not requirements.txt, but have a .txt extension appear to be getting code inspection from this plugin.

To Reproduce

  • Install plugin.
  • Have a non-requirements .txt file in the project
  • View file or manually run project inspection
  • Inappropriate Error highlighting occurs in non-requirements.txt files

Expected behavior These files are ignored.

Example file, robots.txt

# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

Screenshots Screen Shot 2020-08-12 at 4 31 31 PM

IDE (please complete the following information. See Main Menu -> Help -> About): PyCharm 2020.2 (Professional Edition) Build #PY-202.6397.98, built on July 27, 2020 Runtime version: 11.0.7+10-b944.20 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 1979M Cores: 12 Registry: js.debugger.webconsole=false Non-Bundled Plugins: commit-template-idea-plugin, org.jetbrains.plugins.go-template, Gitflow, ru.meanmail.plugin.requirements

Plugin:

  • Version 2020.1-202

Additional context Add any other context about the problem here.

banagale avatar Aug 12 '20 23:08 banagale

Realizing now that this may be because I'm running .2. If so, feel free to close.

banagale avatar Aug 12 '20 23:08 banagale

Spoiled my readme.txt with red text so I had to turn plugin off. 2020.2-202

abcdenis avatar Sep 24 '20 11:09 abcdenis

Version 2021.3-211...

AndrewUshakov avatar Mar 03 '21 16:03 AndrewUshakov

+1 - the plugin is really useful for requirements.txt files but I have to disable it because it messes up all other .txt files.

b78 avatar Apr 29 '21 07:04 b78

the problem is that the default filter includes the pattern *.txt This is too permissive. I removed this from the file types management in settings and the problem is solved.

timrichardson avatar Nov 09 '21 03:11 timrichardson

yes, this, please fix it in the plugin!

@timrichardson works, the walkthru is "Editor > Files Types > Requirements language" and in the right panel remove *.txt

sandrotosi avatar Dec 31 '21 20:12 sandrotosi