Finding resource issues

Finding resource issues

Static code scanning comes into its own when you are able to look beyond simple pattern matching to being able to deeply parse and understand the code.

There are many types of bugs or issues that are easy for developers to find and easy to fix. Such as methods being correctly named, or variables being correctly named or keywords in the right case.

These bugs are often easy and repetitive to fix, but it is very do-able.

When looking through a method, it takes a bit more effort, but developers can still find issues such as unused variables. It just takes more time and the developer needs to be more vigilant.

Even more complicated or difficult to find issues, such as unused methods (or an unused message map), where you would need to need to scan the whole file, and then every other file in your source code repository can be found with a bit of time and a good text editor.

Where static code analysis comes into it's own is when it can find things that developers can't find with their own eyes. Or can't find with a text search.

Static code analysis can work through different paths in the code, and it can dig deeper into the code then any developer can. It can start from one procedure or function and find all the others that are called.

In the case of our latest new rule, we scan through each message flow file and see which ones have compute nodes. For each of those compute nodes we find what code is being called. For each of the procedures it finds, we then check what procedures it calls.

In the end we can start from a compute node, navigate through all the ESQL and determine whether a database connection is used. If we cannot find the database being used, then we can flag an issue against the code - R370 - The compute node has a datasource set but it does not access the database (WMB). By preventing this redundant database usage, the developer can prevent the creation on needless database connections, which is slow and inefficient.


If you are interested in finding out more this rule, our product or were interested in a demonstration, please drop me an email to:

Richard@bettercodingtools.com

Or contact me via the contact page on our website.

Regards

Richard

Richard@bettercodingtools.com

www.bettercodingtools.com




要查看或添加评论,请登录

Richard Huegill的更多文章

  • Opaque parsing and performance

    Opaque parsing and performance

    A while back I was asked what our tooling could do to help improve performance for ACE/IIB code. Whether that means…

    4 条评论
  • Embedding DrawIO IIB/WMB/ACE flow diagrams in Confluence

    Embedding DrawIO IIB/WMB/ACE flow diagrams in Confluence

    Happy New Year My last demonstration was all the way back in time, 2024, almost 3 months and 4 hangovers ago. Or 3…

  • Apologies for the broken webinar

    Apologies for the broken webinar

    So last week we attempted to do a webinar on creating Confluence pages to summarize WMB/IIB/ACE code. Unfortunately…

  • Something I don't know too much about

    Something I don't know too much about

    It's ACE and Java classLoader's (but I'm sure friends will be able to point out many others). Actually this is only…

  • Confluence page generation for IIB/WMB/ACE applications

    Confluence page generation for IIB/WMB/ACE applications

    The larger an organization becomes, the more challenging that it is for an organization to manage is combined knowledge…

    2 条评论
  • WMB / IIB / ACE GitLab pages (with sound this time)

    WMB / IIB / ACE GitLab pages (with sound this time)

    The recent version 17 release of GitLab has added GitLab pages. Last week we did a live demo on using GitLab Pages to…

    2 条评论
  • GitLab Pages and IIB

    GitLab Pages and IIB

    The recent version 17 release of GitLab has added some enhancements and fixed some issues. On the of the newer features…

  • SonarQube 10.6 released

    SonarQube 10.6 released

    SonarSource recently a new version of their Sonarqube platform - SonarQube 10.6 For us, we have to update some of build…

  • Squid's (not the game)

    Squid's (not the game)

    When I develop code, I have never gotten it write first time. This is compounded when you work integration tooling.

  • Information radiators for IIB/ACE/WMB projects managed in GitLab

    Information radiators for IIB/ACE/WMB projects managed in GitLab

    Some of the functionality that we have in our plugin is more the "art" side of software engineering then the hard…

社区洞察

其他会员也浏览了