Comments (8)
gradle-eclipseconfig
uses this fork of editorconfig-core-java
https://github.com/stempler/editorconfig-core-java/tree/maven-central-standardout probably because @denofevil is not interested in releasing editorconfig-core-java
to Maven Central, see #6. So you may be luckier to report this issue on the fork.
from editorconfig-core-java.
@ams-tschoening As a user, you don't input anything into the core library directly, but input into gradle-eclipseconfig, which in turn passes the path to the core library. In the design of the architecture of EditorConfig, gradle-eclipseconfig should handle the normalization process, and therefore this bug should be reported in gradle-eclipseconfig's issue tracker, which is not governed by us.
In other words, I think your concern regarding the expected output makes sense, but I think this is a bug belong to gradle-eclipseconfig.
from editorconfig-core-java.
Can you give an example input and expected output? I suspect that this is intended, as EditorConfig files are supposed to be used cross-platform: We intentionally do not recognize backslashes as path separators, as backslashes can be part of a file name on other systems.
from editorconfig-core-java.
The examples are in my first post already: An arbitrary native Windows-path as source using \
and a config file containing one section [*]
only. That doesn't match the path because it is transformed to the regular expression .*/[^/]*
. That expression seems to be expected to match a path with /
only.
OTOH, the docs say the following:
* | Matches any string of characters, except path separators (/)
** | Matches any string of characters
So am I expected to use one section [**]
only instead? But your reg exp clearly matches path separators in contrast what the docs are saying.
The project I'm using, gradle-eclipseconfig
, suggests to use [*]
and did use absolute paths always and that did work on Linux. Which make sense looking at your reg exp, it only can't work for native Windows paths this way.
Only forward slashes (/, not backslashes) are used as path separators[...]
This reads like one needs to normalize paths to /
always, either EditorConfig
or all callers individually. The latter doesn't make much sense to me. Else I don't see how sections with /
can match native Windows paths ever.
from editorconfig-core-java.
@ams-tschoening Are you a plugin developer using editorconfig-core-java or a user using some editor plugin?
from editorconfig-core-java.
I'm just so confused by everything you said. Are you using the Eclipse plugin? If so, the plugin should normalize the path before it passes the path to editorconfig-core-java
, and hence should be a bug reported there. If you are a plugin developer and would like to use this core library, then you should normalize the path before you pass it to editorconfig-core-java
.
from editorconfig-core-java.
He is a user of gradle-eclipseconfig https://github.com/stempler/gradle-eclipseconfig that uses a fork of editorconfig-core-java
from editorconfig-core-java.
If so, the plugin should normalize the path before it passes the path to editorconfig-core-java[...]
Wouldn't it be easier for your users if you normalize the given path to /
always internally? That would have prevented the problem I was running into entirely. If you think otherwise, feel free to close this issue.
from editorconfig-core-java.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editorconfig-core-java.