Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1408761

Browse files
authored
Merge pull request #93 from Shoelace/feature/warning_cleanup
Feature/warning cleanup
2 parents 45f212f + 0076bc4 commit 1408761

95 files changed

Lines changed: 329 additions & 238 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
.gitattributes export-ignore
3+
.gitignore export-ignore
4+
.gitmodules export-ignore
5+
.travis.yml export-ignore
6+
7+
.travis export-ignore
8+
tools export-ignore
9+
10+
^docsource/* linguist-documentation

.travis/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ set -ev
55
cd source
66
#install core of utplsql
77
"$ORACLE_HOME/bin/sqlplus" $UT3_USER/$UT3_PASSWORD @install.sql
8+
9+
10+
cd ..
11+
cd build
12+
#do style check
13+
"$ORACLE_HOME/bin/sqlplus" $UT3_USER/$UT3_PASSWORD @utplsql_style_check.sql

build/utplsql_style_check.sql

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
ALTER SESSION SET PLSCOPE_SETTINGS= 'IDENTIFIERS:ALL';
2+
3+
--install or comple all code here
4+
exec dbms_utility.compile_schema(USER,compile_all => TRUE,reuse_settings => FALSE);
5+
6+
7+
var errcnt number
8+
9+
column errcnt_a noprint new_value errcnt_a
10+
column errcnt_l noprint new_value errcnt_l
11+
column errcnt_c noprint new_value errcnt_c
12+
13+
--find parameters that donot begin with A_
14+
prompt parameters should start with A_
15+
select NAME,TYPE,OBJECT_NAME,OBJECT_TYPE,USAGE,LINE,COL , count(*) over() errcnt_a
16+
from user_identifiers
17+
where type like 'FORMAL%' and usage = 'DECLARATION'
18+
and name != 'SELF'
19+
and name not like 'A#_%' escape '#'
20+
order by object_name, object_type, line, col
21+
;
22+
23+
prompt variables should start with L_
24+
--variables start with l_ or g_
25+
select NAME,TYPE,OBJECT_NAME,OBJECT_TYPE,USAGE,LINE,COL , count(*) over() errcnt_l
26+
from user_identifiers
27+
where type like 'VARIABLE' and usage = 'DECLARATION'
28+
and object_type not in ('TYPE')
29+
and (name not like 'L#_%' escape '#'
30+
and name not like 'G#_%' escape '#' --TODO: only valid on package level
31+
)
32+
order by object_name, object_type, line, col
33+
;
34+
35+
--constants start with c_ or gc_
36+
prompt constants should start with C_
37+
select NAME,TYPE,OBJECT_NAME,OBJECT_TYPE,USAGE,LINE,COL , count(*) over() errcnt_c
38+
from user_identifiers
39+
where type like 'CONSTANT' and usage = 'DECLARATION'
40+
and (name not like 'C#_%' escape '#'
41+
and name not like 'GC#_%' escape '#'
42+
)
43+
order by object_name, object_type, line, col
44+
;
45+
46+
47+
exec :errcnt := nvl('&errcnt_a',0) + nvl('&errcnt_l',0) + nvl('&errcnt_c',0);
48+
49+
--quit :errcnt
50+
exit success

examples/RunExampleComplexSuiteWithCustomDBMSOutputReporter.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ begin
2222

2323
testtoexecute := ut_test(a_object_name => 'ut_exampletest'
2424
,a_test_procedure => 'ut_exAmpletest'
25-
,a_test_name => 'Example test1'
25+
,a_test_name => 'Example test1'
2626
,a_setup_procedure => 'Setup'
2727
,a_teardown_procedure => 'tEardown');
2828

@@ -39,7 +39,7 @@ begin
3939
suite_complex := ut_test_suite(a_suite_name => 'Complex Test Suite', a_items => ut_objects_list(suite1, suite2));
4040

4141
-- provide a reporter to process results
42-
suite_complex.execute(ut_custom_reporter(a_tab_size => 2));
42+
suite_complex.do_execute(ut_custom_reporter(a_tab_size => 2));
4343
end;
4444
/
4545

examples/RunExampleTestSuite.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ begin
3131
,a_teardown_procedure => 'TEARDOWN');
3232

3333
suite.add_item(testtoexecute);
34-
suite.execute;
34+
suite.do_execute;
3535

3636
-- No reporter used in this example so outputing the results manually.
3737
for test_idx in suite.items.first .. suite.items.last loop

examples/RunExampleTestSuiteWithCompositeReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ begin
3232
suite.add_item(testtoexecute);
3333

3434
-- provide a reporter to process results
35-
suite.execute(ut_composite_reporter(ut_reporters_list(ut_dbms_output_suite_reporter)));
35+
suite.do_execute(ut_composite_reporter(ut_reporters_list(ut_dbms_output_suite_reporter)));
3636
end;
3737
/
3838

examples/RunExampleTestSuiteWithCustomDBMSOutputReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ begin
3636
suite.add_item(testtoexecute);
3737

3838
-- provide a reporter to process results tabbing each hierarcy level by tab_size
39-
suite.execute(ut_custom_reporter(a_tab_size => 2));
39+
suite.do_execute(ut_custom_reporter(a_tab_size => 2));
4040
end;
4141
/
4242

examples/RunExampleTestSuiteWithDBMSOutputReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ begin
3131
suite.add_item(testtoexecute);
3232

3333
-- provide a reporter to process results
34-
suite.execute(ut_dbms_output_suite_reporter);
34+
suite.do_execute(ut_dbms_output_suite_reporter);
3535
end;
3636
/
3737

examples/RunExampleTestThroughBaseClass.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ begin
2020
,a_teardown_procedure => 'teardown');
2121

2222
reporter := ut_dbms_output_suite_reporter;
23-
simple_test.execute(reporter);
23+
simple_test.do_execute(reporter);
2424
end;
2525
/
2626

source/core/annotations/ut_annotations.pkb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ create or replace package body ut_annotations as
115115
,pattern => '(' || c_rgexp_identifier || ')\s*='
116116
,modifier => 'i'
117117
,subexpression => 1);
118-
l_param_item.value := trim(regexp_substr(l_param_str, '(.+?=)?(.*$)', subexpression => 2));
118+
l_param_item.val := trim(regexp_substr(l_param_str, '(.+?=)?(.*$)', subexpression => 2));
119119

120120
l_annotation_params(l_annotation_params.count + 1) := l_param_item;
121121
end;
@@ -252,7 +252,7 @@ create or replace package body ut_annotations as
252252

253253
for j in 1 .. a_annotated_pkg.package_annotations(l_name).count loop
254254
dbms_output.put_line(' ' || nvl(a_annotated_pkg.package_annotations(l_name)(j).key, '<Anonimous>') || ' = ' ||
255-
nvl(a_annotated_pkg.package_annotations(l_name)(j).value, 'NULL'));
255+
nvl(a_annotated_pkg.package_annotations(l_name)(j).val, 'NULL'));
256256
end loop;
257257
else
258258
dbms_output.put_line(' No parameters.');
@@ -278,7 +278,7 @@ create or replace package body ut_annotations as
278278
for j in 1 .. a_annotated_pkg.procedure_annotations(l_proc_name)(l_name).count loop
279279
dbms_output.put_line(' ' ||
280280
nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).key, '<Anonymous>') ||
281-
' = ' || nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).value, 'NULL'));
281+
' = ' || nvl(a_annotated_pkg.procedure_annotations(l_proc_name) (l_name)(j).val, 'NULL'));
282282
end loop;
283283
else
284284
dbms_output.put_line(' No parameters.');
@@ -340,7 +340,7 @@ create or replace package body ut_annotations as
340340
l_result varchar2(32767);
341341
begin
342342
if a_param_list.exists(a_def_index) then
343-
l_result := a_param_list(a_def_index).value;
343+
l_result := a_param_list(a_def_index).val;
344344
end if;
345345
return l_result;
346346
end get_annotation_param;

0 commit comments

Comments
 (0)