GO.SIMPLIFICATION.RMTWST : Replace Manual Trimming With 'strings.TrimPrefix' (Staticcheck)

This warning class corresponds to a Staticcheck check. The CodeSonar analysis results may include warnings of this class if your CodeSonar project includes Go components.

Summary

This warning class corresponds to a Staticcheck check: "Replace manual trimming with 'strings.TrimPrefix'".

For full check details, see the Staticcheck website: S1017 - Replace manual trimming with 'strings.TrimPrefix'.

Properties

Class Name Replace Manual Trimming With 'strings.TrimPrefix' (Staticcheck)
Significance style
Mnemonic GO.SIMPLIFICATION.RMTWST
Categories
Staticcheck Staticcheck:S1017 Replace manual trimming with 'strings.TrimPrefix'
Availability Available for Go only.
Enabling Checking for this warning class is performed by the third party Staticcheck analyzer, with the results imported into the CodeSonar project.

To enable or disable checking, you will need to adjust your adjust your Staticcheck configuration.

If the checker produces one or more results corresponding to this warning class, they will be submitted to the hub by default. To disable submission, add the following WARNING_FILTER rule to the project configuration file.

WARNING_FILTER += discard class="Replace Manual Trimming With 'strings.TrimPrefix' (Staticcheck)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.