Jump to content

Elliot Hillary

Members
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Elliot Hillary


  1. Please raise an issue on the DelphiLint repository if you encounter a problem. As I've said, we're not actively monitoring this page - I only noticed this post by coincidence - so I can't guarantee your issue will be fixed if it's only discussed here.

     

    The JAVA_HOME environment variable should be set along with your JRE installation. If it's not, then (as you say) DelphiLint prompts you for the location of a Java executable, which is indeed java.exe. Setting this to the java.exe in your JRE folder and clicking "Apply this configuration" should work correctly - if this does not work, please raise an issue with a description of the problems this is causing.

     

    I'm not sure exactly how a change to startup code could improve on this experience, or how the guidance can be improved. Please feel free to raise an issue or pull request suggesting improvements to these!


  2. On 3/30/2024 at 6:46 AM, JonRobertson said:

    For anyone that has DelphiLint installed, I just filed ticket Issue 20 because BDS.exe was racing one logical CPU when the IDE was otherwise idle and no projects were loaded. Once I removed the Delphi Lint package, BDS.exe CPU usage dropped to 0%.

    Thanks for submitting an issue, it was only a small fix - an unoptimized background thread was wasting CPU cycles waiting for the server to start.

    This issue is resolved in DelphiLint 1.0.2, along with a couple of other minor improvements.


  3. 6 hours ago, JonRobertson said:

    I definitely would appreciate customizing rules in standalone mode. I attempted installing SonarQube and going the "connected mode" route. However, I had difficulty getting the SonarQube service started and I am not a Java guy.

     

    Some of the rules are more annoying than helpful. I have no idea what "naming conventions" DelphiLint is expecting. One convention seems to be that unit names must be PascalCase. Particularly for legacy projects, there is no benefit. Yes, a consistent naming convention is very helpful. Does anyone care that all of our form units follow formMain.pas rather than FormMain.pas? 

     

    I almost want to create an issue for the rule "split this 128 characters long line (which is greater than 120 authorized)". Authorized by who, or what? Certainly not by me, my employer, or anything that I've configured in Delphi. 

      

    Others are personal preferences. "Delphi style guides" may advise against using () when calling a routine without arguments. But I prefer to have them. They do no harm and I think they improve code read-ability.

     

    Those are just a couple examples where the ability to customize the rules, even in standalone mode, would be appreciated.

    Sorry to hear you had issues starting up SonarQube - is it possible that the root cause is the same as #8? This part of the SonarQube documentation could be helpful.

     

    By default, DelphiLint and SonarDelphi follow Delphi's Object Pascal Style Guide, so this is where the naming convention rules get their standard opinions from.
    Standalone rule customization is a highly requested feature - we're tracking the proposal as #16 and are looking to add it in a future release.


  4. 1 hour ago, tgbs said:

    How to uninstall

    To uninstall from your IDE, you remove it like any other package through Components > Install Packages. If you’d like to totally remove all traces of DelphiLint from your system, deleting the folder %APPDATA%\DelphiLint will do the trick. 

     

    Although, if you’re uninstalling because you want to install a newer version of DelphiLint instead, there’s no need to do any of this - the install script automatically uninstalls any old versions.

    • Like 2

  5. 8 hours ago, VoSs2o0o said:

    Thank you for your fast support, it is working now! Also this is a very impessive Tool. 

    I will next try it with the SC-Server to have more control over the rules. It will be a Standardtool for me, when i make it to add/remove/tweak some rules...

    Anyway it is still helpful in the Offline-Configuration.

    Great to see that your problem is resolved and you're finding DelphiLint helpful!

     

    We're tracking features and bugs using the GitHub Issues for integrated-application-development/delphilint, so please let us know there if you encounter any problems in the future 🙂


  6. 57 minutes ago, JonRobertson said:

    Thanks for the extra info. Downloaded and renamed. The first unit that I tried to analyze gave this error...

    Sorry to hear that.

    DelphiLint (and SonarDelphi) have been successfully used with much larger codebases than you describe - I suspect this could be a JVM issue.

    Please raise an issue, including your JDK/JRE distribution and version, and we'll see what we can do!


  7. 4 hours ago, JonRobertson said:

    I am curious what the "standalone" version would download from GitHub. Following the link to install SonarDelphi, you need to install SonarQube, then SonarScanner, then install the SonarDelphi plug-in in SonarQube. 

     

    I installed SonarQube and configured a database via the install instructions. But the SonarQube service refuses to start.

    As Zane says, DelphiLint just downloads the SonarDelphi plugin jar from a GitHub release (here) - internally, it runs the plugin as if it was running within SonarScanner.

    Please note that if you choose to manually download the jar and place it in %APPDATA%\DelphiLint\plugins, it should be named "DEFAULT-sonar-delphi-plugin-1.3.0.jar".


  8. 11 hours ago, Stefan Glienke said:

    Is it still not possible to create self-contained executables with Java? If so it would be nice because that would remove the requirement for the JRE.

    While it is possible, it has a number of downsides. It's not an avenue we're pursuing at the moment since installing the JRE is pretty quick and easy.


  9. 4 minutes ago, tgbs said:

    I just tried it and it works. But I didn't see where I could remove the check for mixed names for example. And how to remove the texts from the file without closing Delphi

    Thanks for trying it out - glad it went smoothly for you!

     

    Currently you cannot customise the list of rules used in standalone mode.

    In connected mode, you can configure the rules to use on SonarQube - the relevant section of the SonarDelphi manual is here.

    If there's a lot of interest in customising the rules in standalone mode, that's certainly something that could make its way into a future release.


    There's also currently no way of "clearing" issues from a file after an analysis.

    Of course, if you fix the issues and re-analyze the file, they will disappear, but if this is something you'd like to see as well then please let us know.

     

    We're tracking feature requests and bugs using GitHub Issues - please raise an issue for any features you'd like to see (and of course, for any bugs you encounter)!
    Contributions are also welcome :)

    • Like 1

  10. 37 minutes ago, Der schöne Günther said:

    I have a stupid question about

     

    Does that mean it runs entirely self-dependent, and I do not need a license for SonarQube?

    That's correct - you don't need to have anything SonarQube-related to use DelphiLint in standalone mode. After installing into the IDE, it's ready to go.

     

    If you decide you would like to set up SonarQube and use DelphiLint in connected mode, it's worth mentioning that SonarQube Community Edition is free, open-source, self-hosted, and does not require any sort of license - with the SonarDelphi plugin it's a great (and free) option for managing Delphi code quality.

    • Like 1

  11. image.png.5303cf8eab4a7e11b7806aff5154884e.png

    We're excited to announce the release of DelphiLint v1.0.0, a free and open-source static analyzer and linter for the Delphi IDE!

     

    DelphiLint is powered by SonarDelphi, our Delphi analyzer for the SonarQube code quality platform that scans entire codebases with more than 120 different rules.
    With DelphiLint, the feedback loop is shortened - it allows you to analyze individual files within your editor and correct problems before they're even checked in.

     

    GitHub: https://github.com/integrated-application-development/delphilint

    Release: https://github.com/integrated-application-development/delphilint/releases/tag/v1.0.0

     

    Features

    • Analyze one or more files on demand
    • View detected issues, descriptions, and rationale inline in the Delphi IDE
    • Two analysis modes:
      • Standalone - run analyses entirely locally with a default set of active rules
      • Connected - connect to a SonarQube instance, allowing for
        • Fetching of active rules and configuration from the server's configured quality profiles
        • Suppression of issues that have been resolved in past analyses
        • Usage of the server's version of SonarDelphi
    • Uses the same rules and configuration files as SonarDelphi, making configuration easy for projects that already use SonarDelphi for code quality

     

    DelphiLint supports RAD Studio for Delphi 11+.

    Feedback and contributions are welcome!

    • Like 17
    • Thanks 1
×