Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
c1120a79
Commit
c1120a79
authored
Oct 10, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: remove jsl tests
This linter is too old and no longer relevant
parent
ab885af7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
195 deletions
+0
-195
product/ERP5/tests/jsl.conf
product/ERP5/tests/jsl.conf
+0
-124
product/ERP5/tests/testXHTML.py
product/ERP5/tests/testXHTML.py
+0
-69
product/ERP5Type/tests/CodingStyleTest.py
product/ERP5Type/tests/CodingStyleTest.py
+0
-2
No files found.
product/ERP5/tests/jsl.conf
deleted
100644 → 0
View file @
ab885af7
#
# Configuration File for JavaScript Lint 0.3.0
# Developed by Matthias Miller (http://www.JavaScriptLint.com)
#
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
#
### Warnings
# Enable or disable warnings based on requirements.
# Use "+WarningName" to display or "-WarningName" to suppress.
#
-
no_return_value
# function {0} does not always return a value
+
duplicate_formal
# duplicate formal argument {0}
+
equal_as_assign
# test for equality (==) mistyped as assignment (=)?{0}
+
var_hides_arg
# variable {0} hides argument
+
redeclared_var
# redeclaration of {0} {1}
-
anon_no_return_value
# anonymous function does not always return a value
+
missing_semicolon
# missing semicolon
+
meaningless_block
# meaningless block; curly braces have no impact
+
comma_separated_stmts
# multiple statements separated by commas (use semicolons?)
+
unreachable_code
# unreachable code
+
missing_break
# missing break statement
+
missing_break_for_last_case
# missing break statement for last case in switch
+
comparison_type_conv
# comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
-
inc_dec_within_stmt
# increment (++) and decrement (--) operators used as part of greater statement
+
useless_void
# use of the void type may be unnecessary (void is always undefined)
+
multiple_plus_minus
# unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
+
use_of_label
# use of label
-
block_without_braces
# block statement without curly braces
+
leading_decimal_point
# leading decimal point may indicate a number or an object member
+
trailing_decimal_point
# trailing decimal point may indicate a number or an object member
+
octal_number
# leading zeros make an octal number
+
nested_comment
# nested comment
+
misplaced_regex
# regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
-
ambiguous_newline
# unexpected end of line; it is ambiguous whether these lines are part of the same statement
+
empty_statement
# empty statement or extra semicolon
-
missing_option_explicit
# the "option explicit" control comment is missing
+
partial_option_explicit
# the "option explicit" control comment, if used, must be in the first script tag
+
dup_option_explicit
# duplicate "option explicit" control comment
+
useless_assign
# useless assignment
+
ambiguous_nested_stmt
# block statements containing block statements should use curly braces to resolve ambiguity
+
ambiguous_else_stmt
# the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
+
missing_default_case
# missing default case in switch statement
+
duplicate_case_in_switch
# duplicate case in switch statements
+
default_not_at_end
# the default case is not at the end of the switch statement
+
legacy_cc_not_understood
# couldn't understand control comment using /*@keyword@*/ syntax
+
jsl_cc_not_understood
# couldn't understand control comment using /*jsl:keyword*/ syntax
+
useless_comparison
# useless comparison; comparing identical expressions
+
with_statement
# with statement hides undeclared variables; use temporary variable instead
+
trailing_comma_in_array
# extra comma is not recommended in array initializers
+
assign_to_function_call
# assignment to a function call
+
parseint_missing_radix
# parseInt missing radix parameter
### Output format
# Customize the format of the error message.
# __FILE__ indicates current file path
# __FILENAME__ indicates current file name
# __LINE__ indicates current line
# __ERROR__ indicates error message
#
# Visual Studio syntax (default):
+
output
-
format
__
FILE__
(
__
LINE__
):
__
ERROR__
# Alternative syntax:
#+output-format __FILE__:__LINE__: __ERROR__
### Context
# Show the in-line position of the error.
# Use "+context" to display or "-context" to suppress.
#
+
context
### Semicolons
# By default, assignments of an anonymous function to a variable or
# property (such as a function prototype) must be followed by a semicolon.
#
+
lambda_assign_requires_semicolon
### Control Comments
# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
# although legacy control comments are enabled by default for backward compatibility.
#
+
legacy_control_comments
### JScript Function Extensions
# JScript allows member functions to be defined like this:
# function MyObj() { /*constructor*/ }
# function MyObj.prototype.go() { /*member function*/ }
#
# It also allows events to be attached like this:
# function window::onload() { /*init page*/ }
#
# This is a Microsoft-only JavaScript extension. Enable this setting to allow them.
#
-
jscript_function_extensions
### Defining identifiers
# By default, "option explicit" is enabled on a per-file basis.
# To enable this for all files, use "+always_use_option_explicit"
-
always_use_option_explicit
# Define certain identifiers of which the lint is not aware.
# (Use this in conjunction with the "undeclared identifier" warning.)
#
# Common uses for webpages might be:
#+define window
#+define document
### Files
# Specify which files to lint
# Use "+recurse" to enable recursion (disabled by default).
# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
# or "+process Folder\Path\*.htm".
#
+
process
jsl
-
test
.
js
product/ERP5/tests/testXHTML.py
View file @
c1120a79
...
...
@@ -57,50 +57,10 @@ class TestXHTMLMixin(ERP5TypeTestCase):
'erp5_discussion/WebSection_viewLatestDiscussionPostListAsRSS'
,
'erp5_core/Base_viewHistoricalComparisonDiff'
,
'erp5_diff/ERP5Site_viewDiffTwoObjectDialog'
,]
JSL_IGNORE_FILE_LIST
=
(
'diff2html.js'
,
'diff2html-ui.js'
,
'dream_graph_editor/lib/handlebars.min.js'
,
'dream_graph_editor/lib/jquery-ui.js'
,
'dream_graph_editor/lib/jquery.js'
,
'dream_graph_editor/lib/jquery.jsplumb.js'
,
'dream_graph_editor/lib/jquery.simulate.js'
,
'dream_graph_editor/lib/qunit.js'
,
'dream_graph_editor/lib/springy.js'
,
'handlebars.js'
,
'jio.js'
,
'jslint.js'
,
'pdf_js/build/pdf.js'
,
'pdf_js/build/pdf.worker.js'
,
'pdf_js/compatibility.js'
,
'pdf_js/debugger.js'
,
'pdf_js/l10n.js'
,
'pdf_js/viewer.js'
,
'renderjs.js'
,
'require.js'
,
'require.min.js'
,
'rsvp.js'
,
'wz_dragdrop.js'
,
'gadget_vcs_status.js'
,
# XXX because jsl is buggy
)
JSL_IGNORE_SKIN_LIST
=
(
'erp5_code_mirror'
,
'erp5_fckeditor'
,
'erp5_ckeditor'
,
'erp5_jquery'
,
'erp5_jquery_ui'
,
'erp5_pivot_table'
,
'erp5_sql_browser'
,
'erp5_dhtmlx_scheduler'
,
'erp5_svg_editor'
,
)
HTML_IGNORE_FILE_LIST
=
(
'gadget_erp5_side_by_side_diff.html'
,
)
# NOTE: Here the difference between the JSL_IGNORE_SKIN_LIST is that we also
# consider the folders inside the skin. In this way, we can include multiple
# HTML files at once which are inside some folder in any skin folder.
HTML_IGNORE_SKIN_FOLDER_LIST
=
(
'erp5_jquery'
,
'erp5_fckeditor'
,
...
...
@@ -225,35 +185,6 @@ class TestXHTMLMixin(ERP5TypeTestCase):
self
.
assertFalse
(
self
.
portal
.
portal_skins
.
SkinsTool_checkFieldExternalValidator
())
def
test_javascript_lint
(
self
):
skins_tool
=
self
.
portal
.
portal_skins
path_list
=
[]
for
script_path
,
script
in
skins_tool
.
ZopeFind
(
skins_tool
,
obj_metatypes
=
(
'File'
,
'DTML Method'
,
'DTML Document'
),
search_sub
=
1
):
if
script_path
.
endswith
(
'.js'
):
x
=
script_path
.
split
(
'/'
,
1
)
if
not
(
x
[
0
]
in
self
.
JSL_IGNORE_SKIN_LIST
or
x
[
1
]
in
self
.
JSL_IGNORE_FILE_LIST
):
path_list
.
append
(
script_path
)
portal_skins_path
=
self
.
portal
.
getId
()
+
'/portal_skins/'
args
=
(
'jsl'
,
'-stdin'
,
'-nologo'
,
'-nosummary'
,
'-conf'
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'jsl.conf'
))
error_list
=
[]
for
path
in
path_list
:
check_path
=
portal_skins_path
+
path
body
=
self
.
publish
(
check_path
).
getBody
()
try
:
stdout
,
stderr
=
Popen
(
args
,
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
,
close_fds
=
True
).
communicate
(
body
)
except
OSError
as
e
:
e
.
strerror
+=
'
\
n
%r'
%
os
.
environ
raise
if
stdout
:
error_list
.
append
((
check_path
,
stdout
))
if
error_list
:
message
=
'
\
n
'
.
join
([
"%s
\
n
%s
\
n
"
%
error
for
error
in
error_list
])
self
.
fail
(
message
)
def
test_html_file
(
self
):
skins_tool
=
self
.
portal
.
portal_skins
path_list
=
[]
...
...
product/ERP5Type/tests/CodingStyleTest.py
View file @
c1120a79
...
...
@@ -127,8 +127,6 @@ def test_suite():
(
CodingStyleTest
,),
{
'tested_business_template'
:
tested_business_template
,
# currently, jsl based test_javascript_lint report too many false positives.
'test_javascript_lint'
:
None
,
},
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment