Skip to content

Commit e3a2ded

Browse files
committed
Add rules to ban domains with constraints
1 parent 6d3a10f commit e3a2ded

File tree

23 files changed

+216
-5
lines changed

23 files changed

+216
-5
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ build/
3232
.vscode/
3333

3434
### Mac OS ###
35-
.DS_Store
35+
.DS_Store
36+
37+
/sonar-scanner-*
38+
/samples/.scannerwork/

BUILDING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ docker run -d \
4646
--name sonarqube \
4747
-e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true \
4848
-p 9000:9000 \
49-
-v $(pwd)/target/sonar-postgres-plugin-1.2-SNAPSHOT.jar:/opt/sonarqube/extensions/plugins/sonar-postgres-plugin-1.2-SNAPSHOT.jar \
49+
-v $(pwd)/target/sonar-postgres-plugin-1.4-SNAPSHOT.jar:/opt/sonarqube/extensions/plugins/sonar-postgres-plugin-1.4-SNAPSHOT.jar \
5050
sonarqube:lts-community
5151
xdg-open http://localhost:9000/
5252
docker logs -f sonarqube
@@ -66,8 +66,8 @@ mvn sonar:sonar \
6666
```shell
6767
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
6868
unzip sonar-scanner-cli-5.0.1.3006-linux.zip
69-
cd sonar-scanner-5.0.1.3006-linux
70-
bin/sonar-scanner \
69+
cd samples
70+
../sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner \
7171
-Dsonar.login=admin \
7272
-Dsonar.password=admin1 \
7373
-Dsonar.host.url=http://localhost:9000 \

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Check [BUILDING.md](BUILDING.md)
1717
* [adding-serial-primary-key-field](src/main/resources/com/premiumminds/sonar/postgres/adding-serial-primary-key-field.md)
1818
* [ban-char-field](src/main/resources/com/premiumminds/sonar/postgres/ban-char-field.md)
1919
* [ban-drop-database](src/main/resources/com/premiumminds/sonar/postgres/ban-drop-database.md)
20+
* [ban-alter-domain-with-add-constraint](src/main/resources/com/premiumminds/sonar/postgres/ban-alter-domain-with-add-constraint.md)
21+
* [ban-create-domain-with-constraint](src/main/resources/com/premiumminds/sonar/postgres/ban-create-domain-with-constraint.md)
2022
* [changing-column-type](src/main/resources/com/premiumminds/sonar/postgres/changing-column-type.md)
2123
* [cluster](src/main/resources/com/premiumminds/sonar/postgres/cluster.md)
2224
* [concurrently](src/main/resources/com/premiumminds/sonar/postgres/concurrently.md)
@@ -38,4 +40,4 @@ Check [BUILDING.md](BUILDING.md)
3840
* [vacuum-full](src/main/resources/com/premiumminds/sonar/postgres/vacuum-full.md)
3941

4042
## Acknowledgements
41-
* [Squawk](https://squawkhq.com/)
43+
* [Squawk](https://squawkhq.com/)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_1 SET DEFAULT 1;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_2 SET NOT NULL;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_3 DROP CONSTRAINT other_domain_name;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_4 RENAME CONSTRAINT constraint_name TO other_constraint_name;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_5 RENAME TO other_domain_name;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_6 VALIDATE CONSTRAINT constraint_name;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER DOMAIN domain_name_7 OWNER TO you;

0 commit comments

Comments
 (0)