Giter VIP home page Giter VIP logo

apexlint's Introduction

Hi there ๐Ÿ‘‹, I'm Renato

Salesforce Engineer/Developer/Administrator/Architect, 13x certified.

Proudly the first person to (publicly on GitHub) publish a time-based one-time password algorithm in Apex.

I also write other useful things such as Apex JSON Path, the minimum implementation of JSON Path, but in Apex, and the tile wall component that you can show in your Lightning Experience record pages. :)

Reaching me

For contributions feel free to create issues and pull requests in my repositories. For direct contact, reach me at renato.oliveira at dogeforce.com.

apexlint's People

Contributors

renatoliveira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apexlint's Issues

Tool miscalculating the length of certain lines

Large lines which contain strings are miscalculated, because the tool removes the string contents before counting them.

Example:

137 characters:

sfab_FabricatedSObjectStub child1 = new sfab_FabricatedSObjectStub(Account.class, new Map<String, Object> { 'Name' => 'Foo-1' });

Exactly 120 characters if we ignore the two tabs, but still 128 characters:

sfab_FabricatedSObjectStub child1 = new sfab_FabricatedSObjectStub(Account.class, new Map<String, Object> { '' => '' });

W0001 triggering incorrectly

List<User> users = [select Id, Email, IsActive from User where Id not in :ignoreIds];

returns the error: W0001 at 19: SOQL query with more than one condition and/or field being searched should be splitted into multiple lines.

^ Also there is a grammatical mistake in the error wording.

I'm really excited for this project but see it hasn't been touched in a while. Are you happy to accept pull requests on this repo?

Running on folder is not working

Running in a single file the linting works, but when specifying a folder it does not.

๐Ÿ“‚ - Running on folder src/classes...
โœ… - No errors found.
๐Ÿ“„ - Running on file src/classes/OpportunityWS.cls...
โŒ - 29: Line exceeds the limit of 120 characters.
โŒ - 117: Line exceeds the limit of 120 characters.
โŒ - 127: SOQL query with more than one condition and/or field being searched should be splitted into multiple lines.
โŒ - 138: Line exceeds the limit of 120 characters.

Improve error report when running on folder

Right now there's a list of errors, but no indicator of which file the error was found. Nothing to bother with when running on a single file, but is a big issue when running on folders.

Features from Readme.md

  • Be able to run the linter from the command line (should be a priority when getting more items done in this list)
  • Make the linter read and sort the code by contexts.
  • Make the linter able to distinguish between context types (class scope, method scope, etc).
  • Basic rules with error outputs, like maximum line length.
  • Detect SOQL statements used in one line
  • Detect SOQL statements inside for loops as list variable:
    for (Object o : [SELECT ... ]) { ...
  • Basic detection of SOQL statements inside loop structures.
  • Create code for the different errors, and flags to ignore those when necessary.

Add summary when running on folders

Add a summary at the end of the report, like:

[37/40] - 5 errors found on 3 files.

Note: the left counter is for files, not errors. The error count can be bigger than the file count, since a file can have multiple errors.

Possibly add color to the output, like when running tests with Mocha. ๐Ÿค”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.