[javascriptlint-commit] SF.net SVN: javascriptlint:[219] trunk
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2008-08-26 03:50:20
|
Revision: 219
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=219&view=rev
Author: matthiasmiller
Date: 2008-08-26 03:50:14 +0000 (Tue, 26 Aug 2008)
Log Message:
-----------
unreferenced_identifier: by default, disable for tests to reduce noise
Modified Paths:
--------------
trunk/test.py
trunk/tests/control_comments/declare.js
trunk/tests/control_comments/option_explicit-with.js
trunk/tests/control_comments/option_explicit.js
trunk/tests/warnings/ambiguous_newline.js
trunk/tests/warnings/anon_no_return_value.js
trunk/tests/warnings/assign_to_function_call.js
trunk/tests/warnings/duplicate_case_in_switch.js
trunk/tests/warnings/inc_dec_within_stmt-ignore.js
trunk/tests/warnings/inc_dec_within_stmt.js
trunk/tests/warnings/leading_decimal_point.js
trunk/tests/warnings/misplaced_regex.js
trunk/tests/warnings/missing_break.js
trunk/tests/warnings/missing_default_case.js
trunk/tests/warnings/missing_semicolon.js
trunk/tests/warnings/no_return_value.js
trunk/tests/warnings/octal_number.js
trunk/tests/warnings/parseint_missing_radix.js
trunk/tests/warnings/redeclared_var.js
trunk/tests/warnings/trailing_comma_in_array.js
trunk/tests/warnings/trailing_decimal_point.js
trunk/tests/warnings/unreferenced_identifier.js
trunk/tests/warnings/useless_quotes.js
trunk/tests/warnings/var_hides_arg.js
Modified: trunk/test.py
===================================================================
--- trunk/test.py 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/test.py 2008-08-26 03:50:14 UTC (rev 219)
@@ -4,6 +4,12 @@
import pyjsl.conf
import pyjsl.lint
+_DEFAULT_CONF = """
+# This warning triggers a lot of warnings in many of the tests, so only enable
+# it when specifically testing it.
+-unreferenced_identifier
+"""
+
class TestError(Exception):
pass
@@ -11,6 +17,7 @@
regexp = re.compile(r"/\*conf:([^*]*)\*/")
text = '\n'.join(regexp.findall(script))
conf = pyjsl.conf.Conf()
+ conf.loadtext(_DEFAULT_CONF)
conf.loadtext(text)
return conf
Modified: trunk/tests/control_comments/declare.js
===================================================================
--- trunk/tests/control_comments/declare.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/control_comments/declare.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function declare() {
window.alert('http://www.javascriptlint.com/');
/*jsl:declare window*/ /*warning:redeclared_var*/
Modified: trunk/tests/control_comments/option_explicit-with.js
===================================================================
--- trunk/tests/control_comments/option_explicit-with.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/control_comments/option_explicit-with.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function option_explicit() {
var o = {};
Modified: trunk/tests/control_comments/option_explicit.js
===================================================================
--- trunk/tests/control_comments/option_explicit.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/control_comments/option_explicit.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
var g;
function option_explicit(parm) {
/* legal - j is declared */
Modified: trunk/tests/warnings/ambiguous_newline.js
===================================================================
--- trunk/tests/warnings/ambiguous_newline.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/ambiguous_newline.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function ambiguous_newline() {
/* the EOL test is based on JSLint's documentation */
var a, b, i, o, s;
Modified: trunk/tests/warnings/anon_no_return_value.js
===================================================================
--- trunk/tests/warnings/anon_no_return_value.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/anon_no_return_value.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function anon_no_return_value() {
var error1 = function(b) {
if (b)
Modified: trunk/tests/warnings/assign_to_function_call.js
===================================================================
--- trunk/tests/warnings/assign_to_function_call.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/assign_to_function_call.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function assign_to_function_call() {
var o;
var s;
Modified: trunk/tests/warnings/duplicate_case_in_switch.js
===================================================================
--- trunk/tests/warnings/duplicate_case_in_switch.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/duplicate_case_in_switch.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function duplicate_case_in_switch() {
var i, o, s;
Modified: trunk/tests/warnings/inc_dec_within_stmt-ignore.js
===================================================================
--- trunk/tests/warnings/inc_dec_within_stmt-ignore.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/inc_dec_within_stmt-ignore.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function inc_dec_within_stmt() {
var x;
do {
Modified: trunk/tests/warnings/inc_dec_within_stmt.js
===================================================================
--- trunk/tests/warnings/inc_dec_within_stmt.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/inc_dec_within_stmt.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function inc_dec_within_stmt() {
var i, s;
Modified: trunk/tests/warnings/leading_decimal_point.js
===================================================================
--- trunk/tests/warnings/leading_decimal_point.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/leading_decimal_point.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function leading_decimal_point() {
var i;
Modified: trunk/tests/warnings/misplaced_regex.js
===================================================================
--- trunk/tests/warnings/misplaced_regex.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/misplaced_regex.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function misplaced_regex() {
var i, re;
Modified: trunk/tests/warnings/missing_break.js
===================================================================
--- trunk/tests/warnings/missing_break.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/missing_break.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function missing_break() {
var i, o, s;
Modified: trunk/tests/warnings/missing_default_case.js
===================================================================
--- trunk/tests/warnings/missing_default_case.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/missing_default_case.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function missing_default_case() {
var i, s;
Modified: trunk/tests/warnings/missing_semicolon.js
===================================================================
--- trunk/tests/warnings/missing_semicolon.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/missing_semicolon.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,7 +1,7 @@
/*jsl:option explicit*/
function missing_semicolon() {
/* missing semicolon after return */
- function MissingSemicolonOnReturnStatement() { /*warning:unreferenced_identifier*/
+ function MissingSemicolonOnReturnStatement() {
return 0
} /*warning:missing_semicolon*/
Modified: trunk/tests/warnings/no_return_value.js
===================================================================
--- trunk/tests/warnings/no_return_value.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/no_return_value.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function no_return_value() {
function error1(b) {
if (b)
Modified: trunk/tests/warnings/octal_number.js
===================================================================
--- trunk/tests/warnings/octal_number.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/octal_number.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function octal_number() {
var i;
i = 010; /*warning:octal_number*/
Modified: trunk/tests/warnings/parseint_missing_radix.js
===================================================================
--- trunk/tests/warnings/parseint_missing_radix.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/parseint_missing_radix.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function parseint_missing_radix() {
var i;
Modified: trunk/tests/warnings/redeclared_var.js
===================================================================
--- trunk/tests/warnings/redeclared_var.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/redeclared_var.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function redeclared_var() {
var duplicate;
var duplicate; /*warning:redeclared_var*/
Modified: trunk/tests/warnings/trailing_comma_in_array.js
===================================================================
--- trunk/tests/warnings/trailing_comma_in_array.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/trailing_comma_in_array.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function trailing_comma_in_array() {
var a;
Modified: trunk/tests/warnings/trailing_decimal_point.js
===================================================================
--- trunk/tests/warnings/trailing_decimal_point.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/trailing_decimal_point.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function trailing_decimal_point() {
var i;
Modified: trunk/tests/warnings/unreferenced_identifier.js
===================================================================
--- trunk/tests/warnings/unreferenced_identifier.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/unreferenced_identifier.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,3 +1,6 @@
+/* The tests disable this warning by default becaues of noise. Enable it. */
+/*conf:+unreferenced_identifier*/
+
/* outer-level functions shouldn't warn */
var unreferenced_global;
function unreferenced_identifier() {
Modified: trunk/tests/warnings/useless_quotes.js
===================================================================
--- trunk/tests/warnings/useless_quotes.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/useless_quotes.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,4 +1,3 @@
-/*conf:-unreferenced_identifier*/
function useless_quotes() {
var o = {
'key': 1 /*warning:useless_quotes*/
Modified: trunk/tests/warnings/var_hides_arg.js
===================================================================
--- trunk/tests/warnings/var_hides_arg.js 2008-08-26 03:32:35 UTC (rev 218)
+++ trunk/tests/warnings/var_hides_arg.js 2008-08-26 03:50:14 UTC (rev 219)
@@ -1,5 +1,4 @@
/*jsl:option explicit*/
-/*conf:-unreferenced_identifier*/
function var_hides_arg(duplicate1, duplicate2) {
var duplicate1; /*warning:var_hides_arg*/
function inner() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|