Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting showerror #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Reporting showerror #109

wants to merge 1 commit into from

Conversation

bergel
Copy link
Collaborator

@bergel bergel commented Nov 27, 2024

The following unit test is green:

@testset "showerror reporting" begin
    source = """
        function rusage()
            showerror("an error")
            map(showerror, ["a", "b"]);
            safe_showerror("an error")
        end
        """
    @test count_lint_errors(source) == 2
    @test lint_test(source,
        "Line 2, column 5: Reporting with `showerror(...)` instead of `safe_showerror(...)` could leak sensitive data.")
    @test lint_test(source,
        "Line 3, column 9: Reporting with `showerror(...)` instead of `safe_showerror(...)` could leak sensitive data.")
end

Copy link

Static code analyzer report

Output of the StaticLint.jl code analyzer. 🫵Want to contribute?🫵 RelationalAI Style Guide for Julia
Report creation time (UTC): (2024-11-27T15:34:39.683)

  • Line 58, column 43: Use $(x) instead of $x (explanation). raicode/src/linting/extended_checks.jl
  • Line 295, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 351, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 354, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 355, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 395, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 491, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 503, column 5: Use thaskey(dict,key) instead of the Julia's haskey. raicode/src/linting/extended_checks.jl
  • Line 538, column 26: Use tin(item,collection) instead of the Julia's in or . raicode/src/linting/extended_checks.jl
  • Line 31, column 16: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
  • Line 43, column 16: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
  • Line 990, column 41: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
  • Line 1046, column 41: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
  • Line 1107, column 41: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
  • Line 1290, column 21: Unsafe logging statement. You must enclose variables and strings with @safe(...). raicode/test/rai_rules_tests.jl
    🚨In total, 9 rule violations and 0 PR reviewer recommendation are found over 2 Julia files🚨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant