-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: coccinelle #3991
Open
AndreaTagliavini
wants to merge
6
commits into
OP-TEE:master
Choose a base branch
from
AndreaTagliavini:coccinelle-dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
scripts: coccinelle #3991
Commits on Jun 27, 2020
-
scripts: add coccinelle support
Coccinelle is a utility tool used to match specific code patterns in order to modify or statically analyze them. ".cocci"scripts (Semantic Patches) are used to define such patterns and also to specify what actions have to be performed. Add script coccicheck, which allows to execute Coccinelle semantic patches on top of op-tee source code. It is called using the "coccicheck" target in the op-tee Makefile. The script invokes semantic patches in 3 fashions: - use a single semantic patch: specify and execute a single semantic patch from the local set. - use multiple semantic patches: execute all semantic patches from the local set. - use a subset of external patches: specify a single or multiple semantic patches, defined outside of the local set. Reviewed-by: Paolo Valente <[email protected]> Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 554ea08 - Browse repository at this point
Copy the full SHA 554ea08View commit details -
scripts:coccinelle: add bad_null
Add a semantic patch that matches various boolean expressions that compare to NULL, and produces patches that replace them with an equivalent reduced form (e.g. "foo == NULL" becomes "!foo"). Reviewed-by: Paolo Valente <[email protected]> Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1282557 - Browse repository at this point
Copy the full SHA 1282557View commit details -
scripts:coccinelle: add initialize_variables
Add a semantic patch that matches non-initialized variables and produces patches that set values depending on the variable type. - Numeric variables are set to 0 - Size_t arrays are set to {0} - Other arrays are set to {NULL} - Every other variable is set to NULL Reviewed-by: Paolo Valente <[email protected]> Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2059934 - Browse repository at this point
Copy the full SHA 2059934View commit details -
scripts:coccinelle: add warning_overflow
Add a semantic patch that matches the following construct: if(A + B > C) For each occurrence of the construct, a warning is printed, in order to highlight possible overflows. Reviewed-by: Paolo Valente <[email protected]> Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a5fe687 - Browse repository at this point
Copy the full SHA a5fe687View commit details
Commits on Jul 22, 2020
-
Add SPDX-License-Identifier. Add option USE_SUBTREE, which let one run semantic patches on a specific directory instead of the whole tree. Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f16582e - Browse repository at this point
Copy the full SHA f16582eView commit details -
Add SPDX-License-Identifier to semantic patches. Signed-off-by: Andrea Tagliavini <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2c8faba - Browse repository at this point
Copy the full SHA 2c8fabaView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.