-
Notifications
You must be signed in to change notification settings - Fork 0
Checking bugbot is detecting bugs #2
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
base: main
Are you sure you want to change the base?
Changes from all commits
d45fc7c
e5e0577
fc6c734
29d0ae8
21e303d
38273bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Bugbot Rules for Flask Backend | ||
|
|
||
| ## Security | ||
| - Never trust raw input, always validate `request.form` and `request.args`. | ||
| - No string-interpolated SQL queries; use parameterized queries or ORM. | ||
|
|
||
| ## Reliability | ||
| - Always return proper HTTP status codes (200, 400, 500). | ||
| - Ensure all routes handle unexpected inputs gracefully. | ||
|
|
||
| ## Style | ||
| - Keep function names snake_case. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| <body> | ||
| <div class="container"> | ||
| <!-- Main heading --> | ||
| <h1>🌤️ Weather App</h1> | ||
| <h2>🌤️ Weather App</h2> | ||
| <p class="subtitle">Get current weather for any city</p> | ||
|
|
||
| <!-- Weather search form --> | ||
|
|
@@ -44,7 +44,7 @@ <h1>🌤️ Weather App</h1> | |
| {% if weather %} | ||
| <div class="weather-card"> | ||
| <div class="weather-header"> | ||
| <h2>{{ weather.name }}, {{ weather.sys.country }}</h2> | ||
| <h1>{{ weather.name }}, {{ weather.sys.country }}</h1> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Heading Order Violation in Weather AppHeading hierarchy violation: The main app title is now h2 while the conditional weather location becomes h1. This violates the BugBot rule "Headings should follow logical order (h1, then h2, etc.)" and creates poor semantic structure where the primary heading appears inside a conditional block. |
||
| </div> | ||
|
|
||
| <div class="weather-content"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Bugbot Rules for HTML | ||
|
|
||
| ## Accessibility | ||
| - All `<img>` tags must include meaningful `alt` text. | ||
| - Headings should follow logical order (`h1`, then `h2`, etc.). | ||
|
|
||
| ## Clean Code | ||
| - Avoid inline styles; use CSS files instead. | ||
| - Close all tags properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Variable Typo Causes API Response Handling Failure
A typo on line 63 assigns the API response to
respose, but the originalresponsevariable is still referenced later in the function. This causes aNameErrorat runtime, breaking the application's ability to handle the weather API's response.