Skip to content
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

Update GitHub CodeQL and remove LGTM #1918

Merged
merged 17 commits into from
Nov 23, 2022
Merged

Update GitHub CodeQL and remove LGTM #1918

merged 17 commits into from
Nov 23, 2022

Conversation

beat-buesser
Copy link
Collaborator

@beat-buesser beat-buesser commented Nov 16, 2022

Description

This pull request updates GitHub CodeQL to replace LGTM and removes LGTM because of its deactivation in December 2022.

Beat Buesser added 2 commits November 16, 2022 01:02
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
@beat-buesser beat-buesser self-assigned this Nov 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #1918 (3985b09) into main (e7c763b) will increase coverage by 5.10%.
The diff coverage is 87.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1918      +/-   ##
==========================================
+ Coverage   80.48%   85.58%   +5.10%     
==========================================
  Files         248      248              
  Lines       23373    23384      +11     
  Branches     4233     4233              
==========================================
+ Hits        18811    20013    +1202     
+ Misses       3528     2287    -1241     
- Partials     1034     1084      +50     
Impacted Files Coverage Δ
art/attacks/evasion/carlini.py 94.28% <ø> (ø)
art/attacks/evasion/shadow_attack.py 89.60% <0.00%> (-1.46%) ⬇️
art/attacks/poisoning/feature_collision_attack.py 87.28% <0.00%> (-0.75%) ⬇️
art/defences/detector/evasion/detector.py 74.02% <ø> (ø)
art/estimators/classification/lightgbm.py 95.00% <ø> (ø)
art/estimators/gan/tensorflow.py 66.07% <0.00%> (ø)
art/estimators/regression/keras.py 14.11% <0.00%> (ø)
art/experimental/estimators/classification/jax.py 0.00% <0.00%> (ø)
...n_over_transformation/image_center_crop/pytorch.py 21.05% <0.00%> (ø)
art/visualization.py 90.47% <ø> (ø)
... and 91 more

@@ -211,7 +211,7 @@
"""For `label_type="object_detection"` only a list of multiples of 90 degrees is supported."""
)
if isinstance(self.angles, list):
for angle in self.angles: # lgtm [py/non-iterable-in-for-loop]
for angle in self.angles:

Check failure

Code scanning / CodeQL

Non-iterable used in for loop

This for-loop may attempt to iterate over a [non-iterable instance](1) of class [float](2).
Beat Buesser added 3 commits November 16, 2022 11:45
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
@@ -194,7 +194,7 @@
else:
# NHWC <-- NCHW
x = x_nchw.permute(0, 2, 3, 1)
elif x_ndim == 5: # lgtm [py/redundant-comparison]
elif x_ndim == 5:

Check warning

Code scanning / CodeQL

Redundant comparison

Test is always true, because of [this condition](1).
@@ -104,7 +104,7 @@

if x_ndim == 4:
x = x_nhwc
elif x_ndim == 5: # lgtm [py/redundant-comparison]
elif x_ndim == 5:

Check warning

Code scanning / CodeQL

Redundant comparison

Test is always true, because of [this condition](1).
@@ -258,7 +252,7 @@
if dk * alpha < temp2:
temp1 = temp2 / dk
else:
temp2 = u[i] - x_cp[i] # lgtm [py/multiple-definition]
temp2 = u[i] - x_cp[i]

Check warning

Code scanning / CodeQL

Variable defined multiple times

This assignment to 'temp2' is unnecessary as it is [redefined](1) before this value is used. This assignment to 'temp2' is unnecessary as it is [redefined](2) before this value is used.
Beat Buesser added 3 commits November 16, 2022 22:16
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
@beat-buesser beat-buesser changed the title Update CodeQL queries Update CodeQL queries and remove LGTM Nov 17, 2022
@beat-buesser beat-buesser changed the title Update CodeQL queries and remove LGTM Update GitHub CodeQL and remove LGTM Nov 17, 2022
beat-buesser and others added 9 commits November 21, 2022 23:17
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
@beat-buesser beat-buesser merged commit c40e2ce into main Nov 23, 2022
@beat-buesser beat-buesser deleted the development_code_ql branch November 23, 2022 23:01
@lgtm-com
Copy link

lgtm-com bot commented Nov 24, 2022

This pull request fixes 1 alert when merging 3985b09 into e7c763b - view on LGTM.com

fixed alerts:

  • 1 for Redundant assignment

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants