AtomLinter / linter-glsl

Atom package that lints GLSL shaders on the fly.
https://atom.io/packages/linter-glsl
MIT License
15 stars 6 forks source link

Handle transform functions #79

Closed KoltesDigital closed 5 years ago

KoltesDigital commented 6 years ago

I'd like to dig up #68, because I'm using @fand's tool and I'm also stuck when it comes to using glslify. It still doesn't involve sourcemaps within its transform API. Yet I prefer to have error messages which state incorrect line numbers, than no errors at all. Therefore I propose to integrate transform functions as well.

It is meant for glslify but I don't want to force its usage, so it mimics its API. When glslify will work with sourcemaps, this patch should also evolve.

Expected usage: https://github.com/KoltesDigital/veda/commit/a4e6e27bcd22c57132b323a5de260fc1f03a3506

Arcanemagus commented 5 years ago

This is probably better done as a new provider dedicated to glslify than to try to force this customization into this provider.

Let me know if you need any help setting it up!

KoltesDigital commented 5 years ago

I agree on the principle, but I'm not sure whether it'd fit with Atom spirit. As the provide/consume API is only accessible by Atom packages, it'd mean that glslify would be a package, that anyone could install on its own, but this package would do nothing in itself. I'm not aware of any package that works like this. If you are, please let me know, it'd interesting to study from them and make a similar thing.

Well, you could also argue that we don't care about the spirit, as long as it's useful, and maybe the spirit will adapt :)

Arcanemagus commented 5 years ago

Hmm, I assumed glslify was another linter that produced "compatible" output to what glslangValidator does, but it looks to be more of an ecosystem than a linting tool.

You mention that the results are already wrong here, is there a reason you don't do these transformations on the results in whatever you would be pushing these transforms in from?