Skip to content

Commit

Permalink
Major changes related to exceptions
Browse files Browse the repository at this point in the history
1. Fixed rule wise exceptions and global exceptions
2. Fixed flake.nix
3. Made logging debugging info as plugin option
4. Added error_info for ease in llm
  • Loading branch information
piyushgarg-juspay committed Jun 25, 2024
1 parent 9238e40 commit 9c51929
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 108 deletions.
30 changes: 12 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
#
projectFlakeName = "spider";
basePackages = pkgs.haskell.packages.ghc8107;
imports = [
inputs.references.haskellFlakeProjectModules.output
];
packages = {
references.source = inputs.references;
classyplate.source = inputs.classyplate;
};
settings = {
Expand Down
18 changes: 9 additions & 9 deletions sheriff/.juspay/sheriffRules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ rules:
# fn_rule_exceptions: []
# fn_rule_ignore_modules: []

- db_rule_name: "DBRuleTest"
table_name: "TxnRiskCheck"
indexed_cols_names:
- partitionKey
- and:
- txnId
- customerId
db_rule_fixes: ["You might want to include an indexed column in the `where` clause of the query."]
db_rule_exceptions: []
# - db_rule_name: "DBRuleTest"
# table_name: "TxnRiskCheck"
# indexed_cols_names:
# - partitionKey
# - and:
# - txnId
# - customerId
# db_rule_fixes: ["You might want to include an indexed column in the `where` clause of the query."]
# db_rule_exceptions: []

- fn_rule_name: "LogRule"
fn_name: "logErrorT"
Expand Down
2 changes: 1 addition & 1 deletion sheriff/sheriff.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test-suite sheriff-test
ghc-options:
-- Plugin options order: {"throwCompilationError":true,"saveToFile":true,"savePath":".juspay/tmp/sheriff/","indexedKeysPath":".juspay/tmp"}
-fplugin=Sheriff.Plugin
-fplugin-opt=Sheriff.Plugin:{"throwCompilationError":true,"saveToFile":true,"savePath":".juspay/tmp/sheriff/","indexedKeysPath":".juspay/indexedKeys.yaml","failOnFileNotFound":true,"matchAllInsideAnd":true}
-fplugin-opt=Sheriff.Plugin:{"throwCompilationError":true,"saveToFile":true,"savePath":".juspay/tmp/sheriff/","indexedKeysPath":".juspay/indexedKeys.yaml","failOnFileNotFound":true,"matchAllInsideAnd":true,"logDebugInfo":false}
-dumpdir=.juspay/tmp/sheriff/ -ddump-to-file -ddump-parsed-ast -ddump-tc-ast
else
ghc-options:
Expand Down
Loading

0 comments on commit 9c51929

Please sign in to comment.