Skip to content

feat: add sum#4

Open
d-cheholia wants to merge 1 commit into
mainfrom
feat/sum
Open

feat: add sum#4
d-cheholia wants to merge 1 commit into
mainfrom
feat/sum

Conversation

@d-cheholia
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

Here is the summarized build result:
5. Executing build steps
5.1. [ 1/2 ] Print Hello world - Success
5.2. [ 2/2 ] clang-format - Failed
5.3. Collecting artifacts for the 'clang-format' step - Success

Here is the link to Github Actions build: https://github.com/d-cheholia/code-examples/actions/runs/7727788871

Comment thread show_sum/main.cpp
@@ -0,0 +1,13 @@
#include <iostream>

int main( void ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Style issue:
Original code:

↓
int·main(·void····)······{↓

Fixed code:

↓
int·main(void)·{↓

Comment thread show_sum/main.cpp
std::cin >> two;
sum = one + two;
std::cout << "The sum of " << one << " and " << two << " is " << sum << std::endl;
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Style issue:
Original code:

····sum·=·one·+·two;↓
····std::cout·<<·"The·sum·of·"·<<·one·<<·"·and·"·<<·two·<<·"·is·"·<<·sum·<<·std::endl;↓
·}```
Fixed code:
```diff
····sum·=·one·+·two;↓
····std::cout·<<·"The·sum·of·"·<<·one·<<·"·and·"·<<·two·<<·"·is·"·<<·sum↓
··············<<·std::endl;↓
}```

@github-actions
Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 1 file(s) not formatted
  • show_sum/main.cpp
clang-tidy reports: 3 concern(s)
  • show_sum/main.cpp

    show_sum/main.cpp:4:12: warning: [cppcoreguidelines-init-variables]

    variable 'one' is not initialized

        size_t one;
               ^
                   = 0

    show_sum/main.cpp:5:12: warning: [cppcoreguidelines-init-variables]

    variable 'two' is not initialized

        size_t two;
               ^
                   = 0

    show_sum/main.cpp:6:12: warning: [cppcoreguidelines-init-variables]

    variable 'sum' is not initialized

        size_t sum;
               ^
                   = 0

Have any feedback or feature suggestions? Share it here.

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.

1 participant