aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming
diff options
context:
space:
mode:
authoralberto.cuda <alberto.cuda@telecomitalia.it>2016-09-29 07:05:15 +0000
committerRoman Ivanov <romani@users.noreply.github.com>2016-11-05 16:32:06 -0700
commitb99c7d976c688df71bf4ac0a84438ff220b02408 (patch)
tree90714b6e0c333781f3681f0c50ffbb937574d66f /src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming
parent81ad4595fe3a916551d73e467044c87d8462dba6 (diff)
downloadcheckstyle-b99c7d976c688df71bf4ac0a84438ff220b02408.tar.gz
Issue #3473: ParameterNameCheck: new scope and excludeScope properties
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming')
-rw-r--r--src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputScope.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputScope.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputScope.java
new file mode 100644
index 000000000..aae4a4c34
--- /dev/null
+++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/naming/InputScope.java
@@ -0,0 +1,74 @@
+package com.puppycrawl.tools.checkstyle.checks.naming;
+
+public class InputScope {
+
+ public InputScope(int pubconstr) {}
+
+ public void v1(int h) {
+ new Object () {
+ public void i(int inner) {}
+ };
+ }
+
+ protected void v4(int h) {}
+
+ void v2(int h) {}
+
+ private void v3(int h) {}
+
+ public void i1(int pubpub) {}
+
+ protected void i4(int pubprot) {}
+
+ void i2(int pubpack) {}
+
+ private void i3(int pubpriv) {}
+
+ public interface InterfaceScope {
+ void v1(int h);
+
+ void i1(int pubifc);
+ }
+}
+
+class PrivateScope {
+
+ public void v1(int h) {}
+
+ protected void v4(int h) {}
+
+ void v2(int h) {}
+
+ private void v3(int h) {}
+
+ public void i1(int packpub) {}
+
+ protected void i4(int packprot) {}
+
+ void i2(int packpack) {}
+
+ private void i3(int packpriv) {
+ try {
+ /* Make sure catch var is ignored */
+ } catch (Exception exc) {
+ }
+ }
+
+ interface InterfaceScope {
+ void v1(int h);
+
+ void i1(int packifc);
+ }
+
+ interface FuncIfc {
+ void a(int h);
+ }
+
+ public void l() {
+ FuncIfc l1 = (int lexp)->{};
+
+ FuncIfc l2 = (limp)->{};
+ }
+}
+
+