Merge pull request #11741 from github/calumgrant/remove-lgtm

Remove references to LGTM in code
This commit is contained in:
Calum Grant
2023-01-03 14:23:38 +00:00
committed by GitHub
19 changed files with 29 additions and 28 deletions

View File

@@ -1 +1 @@
window.parent.postMessage(userName, 'https://lgtm.com');
window.parent.postMessage(userName, 'https://github.com');

View File

@@ -1 +1 @@
| webview.js:6:12:6:56 | <WebVie ... om'}}/> |
| webview.js:6:12:6:58 | <WebVie ... om'}}/> |

View File

@@ -1,8 +1,8 @@
import { Component } from 'react';
import { WebView } from 'react-native';
class LgtmView extends Component {
class CodeQLView extends Component {
render() {
return <WebView source={{uri: 'https://lgtm.com'}}/>;
return <WebView source={{uri: 'https://github.com'}}/>;
}
}

View File

@@ -1 +1 @@
window.parent.postMessage(userName, 'https://lgtm.com');
window.parent.postMessage(userName, 'https://github.com');

View File

@@ -1,5 +1,5 @@
function h() {
var href = window.location.href;
// OK
window.location = "https://lgtm.com?" + href.substring(href.indexOf('?')+1);
window.location = "https://github.com?" + href.substring(href.indexOf('?')+1);
}

View File

@@ -1,7 +1,7 @@
function k() {
var search = window.location.search.substr(1);
// OK
window.location = "https://lgtm.com" + questionMark() + search;
window.location = "https://github.com" + questionMark() + search;
}
function questionMark() {

View File

@@ -19,3 +19,10 @@
| test.py:10:6:10:18 | test.py:10 | ControlFlowNode for Subscript | import | file://:0:0:0:0 | _Optional()[builtin-class int] |
| test.py:10:15:10:17 | test.py:10 | ControlFlowNode for int | import | file://:0:0:0:0 | builtin-class int |
| test.py:10:20:10:22 | test.py:10 | ControlFlowNode for int | import | file://:0:0:0:0 | builtin-class int |
| test.py:12:1:12:12 | test.py:12 | ControlFlowNode for ClassExpr | import | test.py:12:1:12:12 | class baz |
| test.py:15:7:15:10 | test.py:15 | ControlFlowNode for True | import | file://:0:0:0:0 | bool True |
| test.py:16:11:16:13 | test.py:16 | ControlFlowNode for baz | import | file://:0:0:0:0 | class baz[class baz] |
| test.py:16:11:16:13 | test.py:16 | ControlFlowNode for baz | import | test.py:12:1:12:12 | class baz |
| test.py:16:11:16:18 | test.py:16 | ControlFlowNode for Subscript | import | file://:0:0:0:0 | class baz[class baz] |
| test.py:16:15:16:17 | test.py:16 | ControlFlowNode for baz | import | file://:0:0:0:0 | class baz[class baz] |
| test.py:16:15:16:17 | test.py:16 | ControlFlowNode for baz | import | test.py:12:1:12:12 | class baz |

View File

@@ -9,10 +9,8 @@ def bar(s:set)->Set:
t1 = Optional[Optional[int]]
t2 = Optional[int][int]
# ODASA-8075
# Commented out until the fix has been pushed to LGTM.com
#class baz():
# pass
#
#while True:
# baz = baz[baz]
class baz():
pass
while True:
baz = baz[baz]

View File

@@ -25,14 +25,12 @@ except re.error:
re.compile("]]][[[[]") #$ charSet=3:8
#ODASA-3985
#Half Surrogate pairs
re.compile(u'[\uD800-\uDBFF][\uDC00-\uDFFF]') #$ charSet=0:5 charSet=5:10
#Outside BMP
re.compile(u'[\U00010000-\U0010ffff]') #$ charSet=0:5
#Misparsed on LGTM
#Misparsed
re.compile(r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)") #$ charSet=10:14 charSet=28:32
# parses wrongly, sees this \|/ as a char set start

View File

@@ -21,7 +21,7 @@ re.compile(u'[\uD800-\uDBFF][\uDC00-\uDFFF]') # not escapes
#Outside BMP
re.compile(u'[\U00010000-\U0010ffff]') # not escapes
#Misparsed on LGTM
#Misparsed
re.compile(r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)") #$ escapedCharacter=0:2 escapedCharacter=16:18 escapedCharacter=18:20
#Non-raw string

View File

@@ -62,7 +62,7 @@ re.compile(r'x|')
#Named group with caret and empty choice.
re.compile(r'(?:(?P<n1>^(?:|x)))')
#Misparsed on LGTM
#Misparsed
re.compile(r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)")
re.compile("", re.M) # ODASA-8056

View File

@@ -11,7 +11,7 @@ re.compile(r'(?:.|\n)*b', re.DOTALL) # Has ReDoS.
# minimal example constructed by @erik-krogh
baz = re.compile(r'\+0')
# exerpts from LGTM.com
# exerpts from real-world results
re.compile(r'\+0x')
re.compile(r'\+0x.*')
re.compile(r'+\-0+\.')

View File

@@ -1,8 +1,6 @@
#This code has conflicting attributes,
#but the documentation in the standard library tells you do it this way :(
#See https://discuss.lgtm.com/t/warning-on-normal-use-of-python-socketserver-mixins/677
class ThreadingMixIn(object):
def process_request(selfself, req):

View File

@@ -39,7 +39,7 @@ class UVT(UT, PU):
class IUVT(IUT, UVT):
pass
#False positive observed on LGTM
#False positive
class M1(object):
def __init__(self):
print("A")

View File

@@ -78,7 +78,7 @@ class C(object):
'''
return self is other
#Was FP -- https://github.com/lgtmhq/lgtm-queries/issues/13
#Was FP
def both_sides_known(zero_based="auto", query_id=False):
if query_id and zero_based == "auto":
zero_based = True

View File

@@ -46,7 +46,7 @@ class InitCallsBadInit(ExplicitReturnInInit):
# OK as procedure implicitly returns None
#
# this was seen in the wild: https://lgtm.com/projects/b/jjburton/cgmtools/snapshot/0d8a429b7ea17854a5e5341df98b1cbd54d7fe6c/files/mayaTools/cgm/lib/classes/AttrFactory.py?sort=name&dir=ASC&mode=heatmap#L90
# this was seen in the wild:
# using a pattern of `return procedure_that_logs_error()`
def procedure():

View File

@@ -127,7 +127,7 @@ Z().meth(0)
# makes it such. As a consequence, the query `py/not-named-self` and other
# relevant queries need to account for this.
#
# This has come up in the wild via LGTM as a false positive. For example,
# This has come up in the wild as a false positive. For example,
# `__init_subclass__`:
# https://docs.python.org/3/reference/datamodel.html#customizing-class-creation
# `__class_getitem__`:

View File

@@ -127,7 +127,7 @@ def decorated_inner_function():
#FP observed https://lgtm.com/projects/g/torchbox/wagtail/alerts/
#FP observed
def test_dict_unpacking(queryset, field_name, value):
#True positive
for tag in value.split(','):

View File

@@ -1,7 +1,7 @@
# Ruby analysis support for CodeQL
This directory contains the extractor, CodeQL libraries, and queries that power Ruby
support in [LGTM](https://lgtm.com) and the other CodeQL products that [GitHub](https://github.com)
support in CodeQL products that [GitHub](https://github.com)
makes available to its customers worldwide.
It contains two major components: