Sun Oct 25, 2020 11:38 am
Login Register Lost Password? Contact Us


Query about ECL code quality.

Comments and questions related to the Enterprise Control Language

Tue Jul 28, 2020 11:12 am Change Time Zone

Hello Team,

Is there a way to check the quality of an ECL code ? By checking the quality I mean -
    Are some basic ECL coding guidelines have been followed ?
    Highlighting code which can be improved in terms of performance improvement ?
    Some security checks for code where calls have been made outside HPCC ?

I know when we check the syntax of code OR compile a code in ECL IDE, the IDE does gives us information / warnings at the bottom. How does this happen ? What is the scope / variation of warnings we can get from ECL IDE ?

Thanks and regards,
Akhilesh Badhri.
akhileshbadhri
 
Posts: 14
Joined: Thu Sep 22, 2016 12:15 pm

Tue Jul 28, 2020 12:31 pm Change Time Zone

Akhilesh,
Is there a way to check the quality of an ECL code ? By checking the quality I mean -
Are some basic ECL coding guidelines have been followed ?
Highlighting code which can be improved in terms of performance improvement ?
Some security checks for code where calls have been made outside HPCC ?
AFAIK there are no tools for ECL to do that for you. Coding conventions/standards can vary between companies, and even between different teams within the same company. In our ECL classes we teach generic guidelines and best practices, but there are no "global" guidelines that everyone follows. Therefore, it would be extremely difficult to create a tool to do that.

However, most coding teams have their own operating rules/conventions, and almost always that includes a "code review" step before checking code into version control. That is the step where a junior coder gets their code checked by a more senior member of the team. That is where you can implement adherence to your team's convention/standard.
I know when we check the syntax of code OR compile a code in ECL IDE, the IDE does gives us information / warnings at the bottom. How does this happen ? What is the scope / variation of warnings we can get from ECL IDE ?
Since the ECL language itself does have "hard and fast" syntax rules, the compiler can run a syntax check to ensure the code meets all those rules, and that is what generates the information/warnings. However, syntax rules are NOT the same as your team's coding convention.

There is a new tool that will automatically provide more performance-based information about a workunit, called the Workunit Analyzer. This tool is new and currently limited to reporting just a couple of things it "sees" but it is actively under development and will gain more abilities as it progresses.

Here are some helpful links:HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1560
Joined: Wed Oct 26, 2011 7:40 pm

Tue Jul 28, 2020 2:38 pm Change Time Zone

Thanks a lot Richard. Your reply and the links are very helpful.

Thanks and regards,
Akhilesh Badhri.
akhileshbadhri
 
Posts: 14
Joined: Thu Sep 22, 2016 12:15 pm


Return to ECL

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron