       """
 
       Alternatively, you can use `diff` to only show the issues that were introduced after a certain tag or commit:
-
-      """,
-      :cyan,
-      String.pad_trailing("    mix credo diff #{latest_tag} ", @command_padding),
-      :faint,
-      "# use the latest tag",
-      "\n\n",
+      """
+    ])
+
+    if latest_tag do
+      UI.puts([
+        :cyan,
+        String.pad_trailing("    mix credo diff #{latest_tag} ", @command_padding),
+        :faint,
+        "# use the latest tag",
+        "\n"
+      ])
+    end
+
+    UI.puts([
       :reset,
       :cyan,
       String.pad_trailing(


  defp latest_tag(working_dir) do
    case System.cmd("git", ~w"rev-list --tags --max-count=1", cd: working_dir) do
      {latest_tag_sha1, 0} ->
        case System.cmd("git", ~w"describe --tags #{latest_tag_sha1}", cd: working_dir) do
          {tagname, 0} -> String.trim(tagname)

        :reset,
        """

        This is looking pretty already! You can probably just fix the issues above in one go.

        """,
        readability_hint
      ])
