File paths should be platform-independent
See original GitHub issueConfig file paths (and possibly other paths such as baseline) are stored in detekt.xml
and read back as platform-dependent.
This means that if the detekt.xml
is shared in VCS for the whole team to use, and not everyone is on the same OS (mix of POSIX and Windows users) the paths will not work for some folks and they’ll be bombarded by “file not found” notifications from the Detekt plugin.
The plugin should store paths in a platform-independent way and apply the correct separators at runtime.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Platform-independent file paths? - python - Stack Overflow
You can use os.path and its functions, which take care of OS-specific paths: >>> import os >>> os.path.join('app', 'subdir', 'dir', 'filename.foo') ...
Read more >Constructing file paths that are platform independent - HUGO
Hi,. I wish to construct platform independent file paths within a template for a theme used by users across multiple operating systems. For...
Read more >os.path – Platform-independent manipulation of file names.
When your program encounters a path name, it often needs to know whether the path refers to a file or directory. If you...
Read more >Python 3 Quick Tip: The easy way to deal with file paths on ...
This code will work perfectly on both Windows or Mac. The problem is that it's a pain to use. Writing out os.path.join() and...
Read more >Avoiding Platform Depedent Code
Although Java is considered platform independent (i.e. compiled Java code can ... You can use the path.separator property, or File fields when writing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m actually working on that. Hopefully will have a PR soon. Fighting a bit with IJ 😃
@arturbosch I have a couple of questions for you, I pinged you on the Kotlin Slack, but I am not sure you actually use it. Let me know if you prefer other ways to get in touch.