Skip to content

Commit e56d6d9

Browse files
committed
run codegen for plpgsql_check configuration fields
1 parent b443733 commit e56d6d9

3 files changed

Lines changed: 168 additions & 3 deletions

File tree

docs/schema.json

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,15 +865,92 @@
865865
"additionalProperties": false
866866
},
867867
"PlPgSqlCheckConfiguration": {
868-
"description": "The configuration for type checking.",
868+
"description": "The configuration for plpgsql_check.",
869869
"type": "object",
870870
"properties": {
871+
"allWarnings": {
872+
"description": "Enable all warnings, overriding individual warning parameters. `false` by default.",
873+
"type": [
874+
"boolean",
875+
"null"
876+
]
877+
},
878+
"compatibilityWarnings": {
879+
"description": "Detect deprecated patterns like explicit cursor name assignments in refcursor variables. `false` by default.",
880+
"type": [
881+
"boolean",
882+
"null"
883+
]
884+
},
885+
"constantTracing": {
886+
"description": "Permit variables holding constant values to be used like constants. `true` by default.",
887+
"type": [
888+
"boolean",
889+
"null"
890+
]
891+
},
871892
"enabled": {
872893
"description": "if `false`, it disables the feature and pglpgsql_check won't be executed. `true` by default",
873894
"type": [
874895
"boolean",
875896
"null"
876897
]
898+
},
899+
"extraWarnings": {
900+
"description": "Show warnings regarding missing RETURN statements, shadowed variables, dead code, and unused parameters. `true` by default.",
901+
"type": [
902+
"boolean",
903+
"null"
904+
]
905+
},
906+
"fatalErrors": {
907+
"description": "Stop processing at the first error. `true` by default.",
908+
"type": [
909+
"boolean",
910+
"null"
911+
]
912+
},
913+
"incommentOptionsUsageWarning": {
914+
"description": "Raise warnings when in-comment options are utilized. `false` by default.",
915+
"type": [
916+
"boolean",
917+
"null"
918+
]
919+
},
920+
"otherWarnings": {
921+
"description": "Show warnings about attribute count mismatches, variable overlaps, unused variables, and unwanted casting. `true` by default.",
922+
"type": [
923+
"boolean",
924+
"null"
925+
]
926+
},
927+
"performanceWarnings": {
928+
"description": "Flag performance issues like declared types with modifiers and implicit casts that may prevent index usage. `false` by default.",
929+
"type": [
930+
"boolean",
931+
"null"
932+
]
933+
},
934+
"securityWarnings": {
935+
"description": "Identify potential SQL injection vulnerabilities in dynamic statements. `false` by default.",
936+
"type": [
937+
"boolean",
938+
"null"
939+
]
940+
},
941+
"useIncommentOptions": {
942+
"description": "Activate in-comment options embedded in function source code. `true` by default.",
943+
"type": [
944+
"boolean",
945+
"null"
946+
]
947+
},
948+
"withoutWarnings": {
949+
"description": "Disable all warnings, overriding individual warning parameters. `false` by default.",
950+
"type": [
951+
"boolean",
952+
"null"
953+
]
877954
}
878955
},
879956
"additionalProperties": false

packages/@postgres-language-server/backend-jsonrpc/src/workspace.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,57 @@ export interface PartialPglinterConfiguration {
499499
rules?: PglinterRules;
500500
}
501501
/**
502-
* The configuration for type checking.
502+
* The configuration for plpgsql_check.
503503
*/
504504
export interface PartialPlPgSqlCheckConfiguration {
505+
/**
506+
* Enable all warnings, overriding individual warning parameters. `false` by default.
507+
*/
508+
allWarnings?: boolean;
509+
/**
510+
* Detect deprecated patterns like explicit cursor name assignments in refcursor variables. `false` by default.
511+
*/
512+
compatibilityWarnings?: boolean;
513+
/**
514+
* Permit variables holding constant values to be used like constants. `true` by default.
515+
*/
516+
constantTracing?: boolean;
505517
/**
506518
* if `false`, it disables the feature and pglpgsql_check won't be executed. `true` by default
507519
*/
508520
enabled?: boolean;
521+
/**
522+
* Show warnings regarding missing RETURN statements, shadowed variables, dead code, and unused parameters. `true` by default.
523+
*/
524+
extraWarnings?: boolean;
525+
/**
526+
* Stop processing at the first error. `true` by default.
527+
*/
528+
fatalErrors?: boolean;
529+
/**
530+
* Raise warnings when in-comment options are utilized. `false` by default.
531+
*/
532+
incommentOptionsUsageWarning?: boolean;
533+
/**
534+
* Show warnings about attribute count mismatches, variable overlaps, unused variables, and unwanted casting. `true` by default.
535+
*/
536+
otherWarnings?: boolean;
537+
/**
538+
* Flag performance issues like declared types with modifiers and implicit casts that may prevent index usage. `false` by default.
539+
*/
540+
performanceWarnings?: boolean;
541+
/**
542+
* Identify potential SQL injection vulnerabilities in dynamic statements. `false` by default.
543+
*/
544+
securityWarnings?: boolean;
545+
/**
546+
* Activate in-comment options embedded in function source code. `true` by default.
547+
*/
548+
useIncommentOptions?: boolean;
549+
/**
550+
* Disable all warnings, overriding individual warning parameters. `false` by default.
551+
*/
552+
withoutWarnings?: boolean;
509553
}
510554
export interface PartialSplinterConfiguration {
511555
/**

packages/@postgrestools/backend-jsonrpc/src/workspace.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,57 @@ export interface PartialPglinterConfiguration {
499499
rules?: PglinterRules;
500500
}
501501
/**
502-
* The configuration for type checking.
502+
* The configuration for plpgsql_check.
503503
*/
504504
export interface PartialPlPgSqlCheckConfiguration {
505+
/**
506+
* Enable all warnings, overriding individual warning parameters. `false` by default.
507+
*/
508+
allWarnings?: boolean;
509+
/**
510+
* Detect deprecated patterns like explicit cursor name assignments in refcursor variables. `false` by default.
511+
*/
512+
compatibilityWarnings?: boolean;
513+
/**
514+
* Permit variables holding constant values to be used like constants. `true` by default.
515+
*/
516+
constantTracing?: boolean;
505517
/**
506518
* if `false`, it disables the feature and pglpgsql_check won't be executed. `true` by default
507519
*/
508520
enabled?: boolean;
521+
/**
522+
* Show warnings regarding missing RETURN statements, shadowed variables, dead code, and unused parameters. `true` by default.
523+
*/
524+
extraWarnings?: boolean;
525+
/**
526+
* Stop processing at the first error. `true` by default.
527+
*/
528+
fatalErrors?: boolean;
529+
/**
530+
* Raise warnings when in-comment options are utilized. `false` by default.
531+
*/
532+
incommentOptionsUsageWarning?: boolean;
533+
/**
534+
* Show warnings about attribute count mismatches, variable overlaps, unused variables, and unwanted casting. `true` by default.
535+
*/
536+
otherWarnings?: boolean;
537+
/**
538+
* Flag performance issues like declared types with modifiers and implicit casts that may prevent index usage. `false` by default.
539+
*/
540+
performanceWarnings?: boolean;
541+
/**
542+
* Identify potential SQL injection vulnerabilities in dynamic statements. `false` by default.
543+
*/
544+
securityWarnings?: boolean;
545+
/**
546+
* Activate in-comment options embedded in function source code. `true` by default.
547+
*/
548+
useIncommentOptions?: boolean;
549+
/**
550+
* Disable all warnings, overriding individual warning parameters. `false` by default.
551+
*/
552+
withoutWarnings?: boolean;
509553
}
510554
export interface PartialSplinterConfiguration {
511555
/**

0 commit comments

Comments
 (0)