diff --git a/.nono.sh.swp b/.nono.sh.swp new file mode 100644 index 0000000..19eb61c Binary files /dev/null and b/.nono.sh.swp differ diff --git a/Makefile b/Makefile index 6d8433d..ae5b618 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # Common check target that runs all static analysis check: @echo "Running static analysis..." - @make -C app MISE_BIN=/home/vscode/.local/bin/mise check + @make -C app MISE_BIN=mise check # Precommit target for CI/pre-commit hooks precommit: check @@ -24,4 +24,4 @@ test: # Format code format: - @make -C app format \ No newline at end of file + @make -C app format diff --git a/app/lib/firehose/checks/no_conn_shadowing.ex b/app/lib/firehose/checks/no_conn_shadowing.ex index 405dca5..c1a94f2 100644 --- a/app/lib/firehose/checks/no_conn_shadowing.ex +++ b/app/lib/firehose/checks/no_conn_shadowing.ex @@ -24,7 +24,11 @@ defmodule Firehose.Checks.NoConnShadowing do |> Enum.reverse() end - defp traverse({:=, meta, [{:conn, _, _}, {verb, _, [{:conn, _, _} | _]}]} = ast, issues, issue_meta) + defp traverse( + {:=, meta, [{:conn, _, _}, {verb, _, [{:conn, _, _} | _]}]} = ast, + issues, + issue_meta + ) when verb in @http_verbs do issue = issue_for(issue_meta, meta[:line], verb) {ast, [issue | issues]} @@ -37,7 +41,8 @@ defmodule Firehose.Checks.NoConnShadowing do defp issue_for(issue_meta, line_no, verb) do format_issue( issue_meta, - message: "Conn shadowing detected (`conn = #{verb}(conn, ...)`). Run `./refactor_conn_aliasing.sh ` to fix.", + message: + "Conn shadowing detected (`conn = #{verb}(conn, ...)`). Run `./refactor_conn_aliasing.sh ` to fix.", line_no: line_no ) end diff --git a/app/test/firehose_web/controllers/blog_tags_test.exs b/app/test/firehose_web/controllers/blog_tags_test.exs index 51b8b15..a7f9f1f 100644 --- a/app/test/firehose_web/controllers/blog_tags_test.exs +++ b/app/test/firehose_web/controllers/blog_tags_test.exs @@ -3,8 +3,8 @@ defmodule FirehoseWeb.BlogTagsTest do defp goto_engineering_tag_page(conn, tag) do path = "/blog/engineering/tag/#{tag}" - conn = get(conn, path) - body = html_response(conn, 200) + conn_res = get(conn, path) + body = html_response(conn_res, 200) assert body =~ ~s(tagged "#{tag}") assert body =~ "Engineering Blog" body @@ -12,8 +12,8 @@ defmodule FirehoseWeb.BlogTagsTest do defp goto_releases_tag_page(conn, tag) do path = "/blog/releases/tag/#{tag}" - conn = get(conn, path) - body = html_response(conn, 200) + conn_res = get(conn, path) + body = html_response(conn_res, 200) assert body =~ ~s(tagged "#{tag}") assert body =~ "Release Notes" body @@ -33,8 +33,8 @@ defmodule FirehoseWeb.BlogTagsTest do test "GET /blog/engineering/tag/:tag page shows empty list for nonexistent tag", %{ conn: conn } do - body = get(conn, "/blog/engineering/tag/nonexistent-tag") - assert html_response(body, 200) =~ ~s(tagged "nonexistent-tag") + conn_res = get(conn, "/blog/engineering/tag/nonexistent-tag") + assert html_response(conn_res, 200) =~ ~s(tagged "nonexistent-tag") end end @@ -45,30 +45,30 @@ defmodule FirehoseWeb.BlogTagsTest do end test "GET /blog/releases/tag/:tag page shows filtered posts", %{conn: conn} do - body = get(conn, "/blog/releases/tag/nonexistent-tag") - assert html_response(body, 200) =~ ~s(tagged "nonexistent-tag") + conn_res = get(conn, "/blog/releases/tag/nonexistent-tag") + assert html_response(conn_res, 200) =~ ~s(tagged "nonexistent-tag") end end describe "tag URL pattern" do test "tag URLs follow pattern /blog/:blog_id/tag/:tag for engineering blog", %{conn: conn} do # Test that the tag route exists and works correctly - conn = get(conn, "/blog/engineering/tag/elixir") - assert html_response(conn, 200) =~ ~s(tagged "elixir") + conn_res1 = get(conn, "/blog/engineering/tag/elixir") + assert html_response(conn_res1, 200) =~ ~s(tagged "elixir") - conn = get(conn, "/blog/engineering/tag/phoenix") - assert html_response(conn, 200) =~ ~s(tagged "phoenix") + conn_res2 = get(conn, "/blog/engineering/tag/phoenix") + assert html_response(conn_res2, 200) =~ ~s(tagged "phoenix") end test "tag URLs follow pattern /blog/:blog_id/tag/:tag for releases blog", %{conn: conn} do # Test that the tag route exists and works correctly - conn = get(conn, "/blog/releases/tag/release") - assert html_response(conn, 200) =~ ~s(tagged "release") + conn_res = get(conn, "/blog/releases/tag/release") + assert html_response(conn_res, 200) =~ ~s(tagged "release") end test "nonexistent tags return 200 with empty post list", %{conn: conn} do - conn = get(conn, "/blog/engineering/tag/nonexistent-tag") - assert html_response(conn, 200) + conn_res = get(conn, "/blog/engineering/tag/nonexistent-tag") + assert html_response(conn_res, 200) end end @@ -94,30 +94,30 @@ defmodule FirehoseWeb.BlogTagsTest do test "tags are rendered as clickable links on engineering blog index", %{ conn: conn } do - conn = get(conn, "/blog/engineering") - body = html_response(conn, 200) + conn_res1 = get(conn, "/blog/engineering") + body1 = html_response(conn_res1, 200) # Verify tag links exist with correct href pattern - assert body =~ ~r{href="/blog/engineering/tag/meta"} - assert body =~ ~r{href="/blog/engineering/tag/ai"} + assert body1 =~ ~r{href="/blog/engineering/tag/meta"} + assert body1 =~ ~r{href="/blog/engineering/tag/ai"} end test "tags are rendered as clickable links on releases blog index", %{ conn: conn } do - conn = get(conn, "/blog/releases") - body = html_response(conn, 200) + conn_res2 = get(conn, "/blog/releases") + body2 = html_response(conn_res2, 200) # Verify tag link exists - assert body =~ ~r{href="/blog/releases/tag/release"} + assert body2 =~ ~r{href="/blog/releases/tag/release"} end test "tag links have proper styling classes", %{conn: conn} do - conn = get(conn, "/blog/engineering") - body = html_response(conn, 200) + conn_res3 = get(conn, "/blog/engineering") + body3 = html_response(conn_res3, 200) # Verify blogex-tag-link class is present for tag links - assert body =~ ~r{class="[^"]*blogex-tag-link} + assert body3 =~ ~r{class="[^"]*blogex-tag-link} end end -end \ No newline at end of file +end diff --git a/autoresearch.jsonl b/autoresearch.jsonl new file mode 100644 index 0000000..1b11840 --- /dev/null +++ b/autoresearch.jsonl @@ -0,0 +1 @@ +{"type":"config","name":"Make build verification","metricName":"status","metricUnit":"","bestDirection":"lower"} diff --git a/nono.sh b/nono.sh index a52d41c..14a131e 100644 --- a/nono.sh +++ b/nono.sh @@ -5,6 +5,7 @@ nono run \ --allow /Users/willem/.local/share/mise \ --allow /Users/willem/.pi \ --read /Users/willem/.git \ + --read-file /Users/willem/.gitconfig \ --allow /Users/willem/Library/Caches/mise \ --allow-net \ - -- pi --verbose -p 'write a haiku' + -- pi --verbose