ditinc / linter-cflint Goto Github PK
View Code? Open in Web Editor NEW:shirt: CFLint plugin for Atom Linter
License: MIT License
:shirt: CFLint plugin for Atom Linter
License: MIT License
The rule for unused-method-arguments is a good one, however, it doesn't pick up if you've used the argument by scoping it, e.g. it will say 'foo' is unused even though 'arguments.foo' is used in the function.
Hello,
I just installed Atom and try to make it work with linter-cfLint without success. I have the error "An unexpected error occured with linter-cflint. See the debug log for details."
I have set the java path to "C:\PROGRA1\Java\JRE181.0_1\bin" ("C:\Program Files\Java\jre1.8.0_121") to be sure. Note that this is the 64b.
A quick question, how do I access the log so I can provide more information?
What is the reason for having CFLint bundled? I see that Issue #8 is where it started and removed the ability to define the path as configuration. If I understand correctly, Issue #10 explains why it needed to be forked, but if those changes are part of core CFLint, is it still necessary? It seems to me that it's more of a dependency.
That said, the roadmap indicates you are looking to "remove the dependency on Java" so perhaps you are considering a complete rewrite which would justify the lack of dependency on the original project.
For now, it would be great if the path or at least file name were left to be from a configuration file instead of having to modify main.js
when upgrading since the included jar is not kept up-to-date.
Inspired by .eslintrc
:
.cflintrc
(JSON) to define which rules are turned on/offCFLint
CFLint
so the configuration file can be piped through inputThe code below produces the warning "Component name source is not a valid name. Please use CamelCase and start with a capital letter."
component extends="Controller" output=false {
public void function init() {
super.init();
}
}
I get the following errors in the Atom debugger when I open a .CFM file. I have JRE and JDK installed and have the JAVA_HOME path set in my variables.
/C:/Users/[user]/.atom/packages/linter-cflint/lib/main.js:151 Error: Command failed: reg query "hklm\software\javasoft\java development kit"
ERROR: The system was unable to find the specified registry key or value.
Error: Command failed: reg query "hklm\software\wow6432node\javasoft\java development kit"
ERROR: The system was unable to find the specified registry key or value.
(anonymous function) @ /C:/Users/[user]/.atom/packages/linter-cflint/lib/main.js:151
Great job on setting up the plugin. I didn't know one for Atom existed. I just installed it as a package and was very helpful.
I may be pulling the CFLint-all.jar out in the next release, because we're switching to a gradle build. It should no longer be necessary, as you wouldn't need to install Maven locally. However, how much of a headache would this cause? I'd be more than happy to help you incorporate Gradle into your current project.
Hi, I don't know if you continue to maintain the project, but...
In Lucee 5 there is some new syntax accepted.
I have not check all the new staff but least
the syntax of Lambda expressions (or arrow functions) is not recognized.
Ej. var add = (numeric x, numeric y) => x + y;
Also, and affecting the Adobe Coldfusion as well,
the posibility to declare ordered structs with literal notation doesn't work.
Ej. var my_ordered_struct = [ a=1, b=2 ];
In both cases the linter expects a semicolon somewhere.
I think that for the Lucee only Syntax should be configurable it's recognition.
Thanks in advance.
Auto-detect JAVA_HOME
Set things up so the file is linting as edits are being made, not just when the file is saved.
I've been using Atom with the prettier-atom plugin for a long time. Today I installed linter-cflint and I get this unexpected error
https://www.screencast.com/t/0cYjJR4T
I don't get that if I disable prettier-atom but any way to get the two to play well together?
-Phil
I need to investigate whether this can be done through the central Maven repo, but until then, at least bundle the correct CFLint.jar.
This is a huge job, but I wanted to suggest it
If I have a simple testParse.cfc with these contents
component {
public void function download(required struct rc)
{
if(isNumeric(rc.betaProductID))
{
variables.BetaGateway.incrementDownloadCounter(rc.betaProductID);
location(url=s3Link, addToken=false);
}
}
}
I get "Unable to parse". If I remove the line with variables.BetaGateway...it will parse. Though it will still give a warning "parse-nothing Nothing to parse"
What could be the problem?
Warnings/Errors are being report on line below the actual line where the error is.
I just updated to the latest and when I enable the package I get an Atom notification that says:
"An unexpected error occured with linter-cflint. See the debug log for details."
I googled a while to see if I could find where either Atom or this package stored log files, as well as browsed through .atom and the linter-cflint package directory therein but couldn't spot anything that looked like a log file.
If anyone knows how to locate the relevant log file I'll add more info to add any additional details. At this point it's obviously not even clear if it's an Atom issue or a package issue.
Any time i go to cold fusion files this error is shown in ATOM, My java path is C:\Program Files\Java\jre1.8.0_111\bin, could that be the problem?
Console error:
main.js:123
Error: Command failed: reg query "hklm\software\javasoft\java development kit"
ERROR: The system was unable to find the specified registry key or value.
Error: Command failed: reg query "hklm\software\wow6432node\javasoft\java development kit"
ERROR: The system was unable to find the specified registry key or value.
It's a bad practice because execSync
blocks the event loop completely until the child process is completed, linter's API allows you to return a promise and resolve it with results, You could use that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.