Skip to main content
Restructure answer
Source Link
beatngu13
  • 2.1k
  • 1
  • 11
  • 24

What you are looking for is called static code analysis. (Check this wiki page for a list of tools.)

What type of testing tool can automatically test this?

Have a look at this wiki page for a list of tools. One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository.

If, for instance, you use trunk-based developmentonly check on the server side, you would break the build if you commit a style violation you didn't catch locally, since static code analysis tools typically mark builds unstable. And if you only check locally, you may integrate style violations when a developer has a misconfigured IDE. Therefore, you want to have both. That is, some sort of formatter/plugin/… within your IDE which is compliant with your tool's settings and the tool itself that checks everything that is pushed to the repository.

What you are looking for is called static code analysis. (Check this wiki page for a list of tools.)

What type of testing tool can automatically test this?

One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository.

If, for instance, you use trunk-based development, you would break the build if you commit a style violation you didn't catch locally, since static code analysis tools typically mark builds unstable. And if you only check locally, you may integrate style violations when a developer has a misconfigured IDE. Therefore, you want to have both.

What you are looking for is called static code analysis.

What type of testing tool can automatically test this?

Have a look at this wiki page for a list of tools. One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

If you only check on the server side, you would break the build if you commit a style violation you didn't catch locally, since static code analysis tools typically mark builds unstable. And if you only check locally, you may integrate style violations when a developer has a misconfigured IDE. Therefore, you want to have both. That is, some sort of formatter/plugin/… within your IDE which is compliant with your tool's settings and the tool itself that checks everything that is pushed to the repository.

Extend answer
Source Link
beatngu13
  • 2.1k
  • 1
  • 11
  • 24

What you are looking for is called static code analysis. (Check this wiki page for a list of tools.)

What type of testing tool can automatically test this?

One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository. 

If, for instance, you use trunk-based development, you would the break the build if you commit a style violation occurs (sinceyou didn't catch locally, since static code analysis tools typically mark builds unstable). And if you only check locally, which is probably not whatyou may integrate style violations when a developer has a misconfigured IDE. Therefore, you want to have both.

What you are looking for is called static code analysis.

What type of testing tool can automatically test this?

One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository. If, for instance, you use trunk-based development, you would the break build if a style violation occurs (since static code analysis tools typically mark builds unstable), which is probably not what you want.

What you are looking for is called static code analysis. (Check this wiki page for a list of tools.)

What type of testing tool can automatically test this?

One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository. 

If, for instance, you use trunk-based development, you would break the build if you commit a style violation you didn't catch locally, since static code analysis tools typically mark builds unstable. And if you only check locally, you may integrate style violations when a developer has a misconfigured IDE. Therefore, you want to have both.

Source Link
beatngu13
  • 2.1k
  • 1
  • 11
  • 24

What you are looking for is called static code analysis.

What type of testing tool can automatically test this?

One of the most famous tools is SonarQube, which supports Java, JavaScript, C#, and more. It also offers integrations for various build tools and CI servers (including Jenkins). Plus: It is open source.

And is it better to have it as a Jenkins hook or move it down and into the IDE the developer is using?

You probably want both. That is, some sort of code formatter within your IDE which is compliant with your tool's setting and the tool itself that checks everything that is pushed to the repository. If, for instance, you use trunk-based development, you would the break build if a style violation occurs (since static code analysis tools typically mark builds unstable), which is probably not what you want.