Skip to content

Fixes the bug where nothing is first input (Closes #96)#152

Open
Davictory2003 wants to merge 6 commits intoChicoState:mainfrom
Davictory2003:fix-nothing
Open

Fixes the bug where nothing is first input (Closes #96)#152
Davictory2003 wants to merge 6 commits intoChicoState:mainfrom
Davictory2003:fix-nothing

Conversation

@Davictory2003
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings February 18, 2026 19:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a bug where the application would display a validation message even when "nothing" was entered as the first input. The fix adds an early return when "nothing" is detected as the initial input. The PR also includes code formatting improvements for consistency and adds a GitHub Actions CI/CD workflow to automate compilation checks.

Changes:

  • Added early exit logic to handle "nothing" as first input
  • Reformatted code for consistency (brace placement, spacing, alphabetization)
  • Added GitHub Actions workflow for automated compilation
  • Added CI/CD status badge to README

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
main.cpp Fixes the "nothing" first input bug with early return logic; applies consistent formatting throughout
README.md Adds GitHub Actions CI/CD workflow status badge
.github/workflows/actions.yml Introduces automated compilation workflow for CI/CD

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.cpp Outdated
@@ -1,44 +1,55 @@
#include <algorithm>
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate include detected. The algorithm header is included twice - once at line 1 and again at line 7. Remove one of these duplicate includes.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +20
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake
build:
needs: install
runs-on: ubuntu-latest
steps:
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub Actions workflow has a design flaw. The 'build' job depends on 'install' job via 'needs: install', but each job runs in a fresh container. Dependencies installed in the 'install' job won't be available to the 'build' job. Either combine these into a single job or move the dependency installation steps into the 'build' job itself.

Suggested change
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake
build:
needs: install
runs-on: ubuntu-latest
steps:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +20
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake
build:
needs: install
runs-on: ubuntu-latest
steps:
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'build' job is missing the dependency installation step. Since each GitHub Actions job runs in a fresh container, the build tools (g++, cmake) installed in the 'install' job won't be available here. Add the installation commands to this job or remove the separate 'install' job and include those steps here.

Suggested change
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake
build:
needs: install
runs-on: ubuntu-latest
steps:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake

Copilot uses AI. Check for mistakes.
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.

2 participants