Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Aug 27, 2023
1 parent 0bb7bae commit 1f45777
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spec/functional_test/testers/go_echo_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ require "../func_spec.cr"
extected_endpoints = [
Endpoint.new("/", "GET"),
Endpoint.new("/pet", "GET", [
Param.new("query", "", "query")
Param.new("query", "", "query"),
]),
Endpoint.new("/pet", "POST", [
Param.new("name", "", "json")
Param.new("name", "", "json"),
]),
Endpoint.new("/pet_form", "POST", [
Param.new("name", "", "body")
Param.new("name", "", "body"),
]),
Endpoint.new("/public/secret.html", "GET"),
]
Expand Down
4 changes: 2 additions & 2 deletions src/analyzer/analyzers/analyzer_go_echo.cr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AnalyzerGoEcho < Analyzer
end
end

if line.includes?("Param(") || line.includes?("FormValue(")
if line.includes?("Param(") || line.includes?("FormValue(")
get_param(line).tap do |param|
if param.name.size > 0 && last_endpoint.method != ""
last_endpoint.params << param
Expand All @@ -41,7 +41,7 @@ class AnalyzerGoEcho < Analyzer
end

public_dirs.each do |p_dir|
full_path = (base_path + "/" + p_dir["file_path"]).gsub("//","/")
full_path = (base_path + "/" + p_dir["file_path"]).gsub("//", "/")
Dir.glob("#{full_path}/**/*") do |path|
next if File.directory?(path)
if File.exists?(path)
Expand Down

0 comments on commit 1f45777

Please sign in to comment.