Raffaello / sdl2-vga-terminal

SDL2 VGA Terminal
MIT License
6 stars 1 forks source link

v0.3.0 #86

Closed Raffaello closed 4 years ago

Raffaello commented 4 years ago

Checkpoint 1


Checkpoint 2


during code review


Before Merging

Matrix Build
Build Status


Extra Linked PR as a max of 10 is reached:

todo[bot] commented 4 years ago

refactor name not clear

_setCursorChar -> _setCharAtCursorPosition (?)


https://github.com/Raffaello/sdl2-vga-terminal/blob/b2f1daa533da11a702843a79480efe43932b9137/sdl2-vga-terminal/src/VgaTerminal.cpp#L171-L176


This comment was generated by todo based on a TODO comment in b2f1daa533da11a702843a79480efe43932b9137 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

refactor in a C++ way

using foreach construct.


https://github.com/Raffaello/sdl2-vga-terminal/blob/b2f1daa533da11a702843a79480efe43932b9137/sdl2-vga-terminal/src/VgaTerminal.cpp#L179-L183


This comment was generated by todo based on a TODO comment in b2f1daa533da11a702843a79480efe43932b9137 in #86. cc @Raffaello.
codecov[bot] commented 4 years ago

Codecov Report

Merging #86 into master will increase coverage by 6.01%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
+ Coverage   84.69%   90.70%   +6.01%     
==========================================
  Files           2        4       +2     
  Lines         294      355      +61     
==========================================
+ Hits          249      322      +73     
+ Misses         45       33      -12     
Impacted Files Coverage Δ
sdl2-vga-terminal/src/exceptions/exceptions.hpp 25.00% <25.00%> (ø)
sdl2-vga-terminal/src/Window.cpp 77.77% <76.92%> (+14.14%) :arrow_up:
sdl2-vga-terminal/src/VgaTerminal.cpp 93.86% <90.38%> (+5.46%) :arrow_up:
sdl2-vga-terminal/src/tui/utils.cpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ce155ca...ce155ca. Read the comment docs.

Raffaello commented 4 years ago

codecoverage was red now green.. there is something not right or in collecting the coverage and processing or in the tests themself.... for now it is better than nothing.

todo[bot] commented 4 years ago

lsz is mode.cw,

start make sense spliting to a VgaTerminalRender, all the rendering functions.


https://github.com/Raffaello/sdl2-vga-terminal/blob/0d9d2eb65787b682737a7532a59c7d3c8d3017b0/sdl2-vga-terminal/src/VgaTerminal.cpp#L104-L109


This comment was generated by todo based on a TODO comment in 0d9d2eb65787b682737a7532a59c7d3c8d3017b0 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

not really sure what is this for anymore...

https://github.com/Raffaello/sdl2-vga-terminal/blob/0d9d2eb65787b682737a7532a59c7d3c8d3017b0/sdl2-vga-terminal/src/VgaTerminal.hpp#L104-L109


This comment was generated by todo based on a TODO comment in 0d9d2eb65787b682737a7532a59c7d3c8d3017b0 in #86. cc @Raffaello.
Raffaello commented 4 years ago

failed test on mac

[ RUN      ] VgaTerminal.cursorNoBlinking
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:364: Failure
2: Expected equality of these values:
2:   0
2:   SDL_WaitEventTimeout(&e, 1000)
2:     Which is: 1
2: [  FAILED  ] VgaTerminal.cursorNoBlinking (455 ms)
2: [----------] 24 tests from VgaTerminal (1472 ms total)
2: 
2: [----------] 2 tests from VgaTerminal/CursorBlinkingTests
2: [ RUN      ] VgaTerminal/CursorBlinkingTests.cursorBlinking/0
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 11 vs 1
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 478 vs 1
2: [  FAILED  ] VgaTerminal/CursorBlinkingTests.cursorBlinking/0, where GetParam() = 500 (544 ms)
2: [ RUN      ] VgaTerminal/CursorBlinkingTests.cursorBlinking/1
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 487 vs 1
2: [  FAILED  ] VgaTerminal/CursorBlinkingTests.cursorBlinking/1, where GetParam() = 500 (539 ms)
2: [----------] 2 tests from VgaTerminal/CursorBlinkingTests (1083 ms total)

the cursor blinking is outside the tolerance for the timing so it is like "not respecting the blinking speed"... actually seems an error in the formula computation... cannot be 1 the expected result. so there is a small bug in the function. "buggy test"

no clue for the no blinking test why is behaving like is "blinking".

Raffaello commented 4 years ago

failed test on mac

[ RUN      ] VgaTerminal.cursorNoBlinking
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:364: Failure
2: Expected equality of these values:
2:   0
2:   SDL_WaitEventTimeout(&e, 1000)
2:     Which is: 1
2: [  FAILED  ] VgaTerminal.cursorNoBlinking (455 ms)
2: [----------] 24 tests from VgaTerminal (1472 ms total)
2: 
2: [----------] 2 tests from VgaTerminal/CursorBlinkingTests
2: [ RUN      ] VgaTerminal/CursorBlinkingTests.cursorBlinking/0
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 11 vs 1
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 478 vs 1
2: [  FAILED  ] VgaTerminal/CursorBlinkingTests.cursorBlinking/0, where GetParam() = 500 (544 ms)
2: [ RUN      ] VgaTerminal/CursorBlinkingTests.cursorBlinking/1
2: /Users/runner/runners/2.168.2/work/1/s/sdl2-vga-terminal/test/VgaTerminalTest.cpp:30: Failure
2: Expected: (t) <= (1), actual: 487 vs 1
2: [  FAILED  ] VgaTerminal/CursorBlinkingTests.cursorBlinking/1, where GetParam() = 500 (539 ms)
2: [----------] 2 tests from VgaTerminal/CursorBlinkingTests (1083 ms total)

the cursor blinking is outside the tolerance for the timing so it is like "not respecting the blinking speed"... actually seems an error in the formula computation... cannot be 1 the expected result. so there is a small bug in the function. "buggy test"

no clue for the no blinking test why is behaving like is "blinking".

it seems just slow on mac... that's why is failing. not sure how can be slow the SDL_Timer in macos

todo[bot] commented 4 years ago

aligment

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/TuiTerminal.cpp#L35-L40


This comment was generated by todo based on a TODO comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

as parameter,

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/TuiTerminal.cpp#L164-L169


This comment was generated by todo based on a TODO comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

... from parent container..

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/TuiTerminal.cpp#L165-L170


This comment was generated by todo based on a TODO comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

use a label object (component interface) for the body

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/TuiTerminal.hpp#L37-L42


This comment was generated by todo based on a TODO comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

as a component

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/TuiTerminal.hpp#L40-L45


This comment was generated by todo based on a todo comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/8154be47b12c1a9b09491168a8338a1bcd99cf7b/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 8154be47b12c1a9b09491168a8338a1bcd99cf7b in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/1f48c1281ec8abf192cc2650d09256293cdbc53e/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 1f48c1281ec8abf192cc2650d09256293cdbc53e in #86. cc @Raffaello.
todo[bot] commented 4 years ago

review later on...

https://github.com/Raffaello/sdl2-vga-terminal/blob/701f605951cccccd6548c37e4345da7a83848173/sdl2-vga-terminal/src/TuiTerminal.hpp#L44-L49


This comment was generated by todo based on a TODO comment in 701f605951cccccd6548c37e4345da7a83848173 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/701f605951cccccd6548c37e4345da7a83848173/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 701f605951cccccd6548c37e4345da7a83848173 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

wrappers to getWindow and renderer

I don't like this desing... refactor with an interface


https://github.com/Raffaello/sdl2-vga-terminal/blob/a3674857dbcab0f8ef03074164cf2a78726cdd32/sdl2-vga-terminal/src/TuiTerminal.hpp#L31-L36


This comment was generated by todo based on a TODO comment in a3674857dbcab0f8ef03074164cf2a78726cdd32 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/a3674857dbcab0f8ef03074164cf2a78726cdd32/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in a3674857dbcab0f8ef03074164cf2a78726cdd32 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/35e82dfe0804efa5d4253026290b6917447e2320/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 35e82dfe0804efa5d4253026290b6917447e2320 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

this line smells

a common beaviour of a renderer interface has to be considered now


https://github.com/Raffaello/sdl2-vga-terminal/blob/35e82dfe0804efa5d4253026290b6917447e2320/sdl2-vga-terminal/test/VgaTerminalSnapshotTest.cpp#L13-L18


This comment was generated by todo based on a TODO comment in 35e82dfe0804efa5d4253026290b6917447e2320 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/2f713b9346f8e66b440e96a9cdb76c779cc34b56/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 2f713b9346f8e66b440e96a9cdb76c779cc34b56 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

progressBar algorithm is not optimal

there are wasting operations in drawing the same cell each call.


https://github.com/Raffaello/sdl2-vga-terminal/blob/6baefc3fe0d7229e772b0622fbe04859ecb65b0d/sdl2-vga-terminal/src/TuiTerminal.cpp#L165-L170


This comment was generated by todo based on a TODO comment in 6baefc3fe0d7229e772b0622fbe04859ecb65b0d in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/6baefc3fe0d7229e772b0622fbe04859ecb65b0d/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 6baefc3fe0d7229e772b0622fbe04859ecb65b0d in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/3f18d3000534542aa3651acc75dc6db3a3f1ae4f/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 3f18d3000534542aa3651acc75dc6db3a3f1ae4f in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/a5cc0027d2d8938e6126e7bcfe4e0bfe6e331a52/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in a5cc0027d2d8938e6126e7bcfe4e0bfe6e331a52 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/8562b07e310ca41b06c94f5070642ade3a086770/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 8562b07e310ca41b06c94f5070642ade3a086770 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

snapshot test slowsystem rendering patch

I do not like this patch, but it is the only solution i have to deal with "not rendered yet" check, on slow system otherwise will always fail the check even if it is correct


https://github.com/Raffaello/sdl2-vga-terminal/blob/8562b07e310ca41b06c94f5070642ade3a086770/sdl2-vga-terminal/test/VgaTerminalSnapshotTest.cpp#L19-L24


This comment was generated by todo based on a TODO comment in 8562b07e310ca41b06c94f5070642ade3a086770 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/4cf8a3f0712f3bef6760cf55e2daf226f7f8ceb1/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 4cf8a3f0712f3bef6760cf55e2daf226f7f8ceb1 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/b427a376e08084fc964b453e3060207c5371e44a/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in b427a376e08084fc964b453e3060207c5371e44a in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/ef8b58a8ba22c131720916e96a0e4dd10b9bbfa6/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in ef8b58a8ba22c131720916e96a0e4dd10b9bbfa6 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/e81f072b3d06113c4b3f763048df3ba542750fab/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in e81f072b3d06113c4b3f763048df3ba542750fab in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/8a580e87be3c81844b8838294c3d2240823c7939/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 8a580e87be3c81844b8838294c3d2240823c7939 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/10e95c8de8e48d884d555547324583720831bda1/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 10e95c8de8e48d884d555547324583720831bda1 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/666630e8707959d112d765f062599fa2fb1b9bd7/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 666630e8707959d112d765f062599fa2fb1b9bd7 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/2665a530f9e8c77ad634922cdd2e567dd1e4a596/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 2665a530f9e8c77ad634922cdd2e567dd1e4a596 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/5b8d8065ccd17177163695a4e7a15bc9aad38797/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 5b8d8065ccd17177163695a4e7a15bc9aad38797 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/64d2997f14b84670c4154c668d2a92bd67ec39a2/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 64d2997f14b84670c4154c668d2a92bd67ec39a2 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/85ed19682225421c73885651ba0cd14bae6d34b7/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 85ed19682225421c73885651ba0cd14bae6d34b7 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/070267cce5a2f173ad461784b916ebdfc61f3093/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 070267cce5a2f173ad461784b916ebdfc61f3093 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/d176ccd9ef2cdcad234cfc91e9357c6b83efa5f7/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in d176ccd9ef2cdcad234cfc91e9357c6b83efa5f7 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/842bbfe9005984f29b345f3571f975d97b23fc2a/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 842bbfe9005984f29b345f3571f975d97b23fc2a in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/4277b9007fd39551b4d145491d31a103b8d49f15/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 4277b9007fd39551b4d145491d31a103b8d49f15 in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/9ca66c6ee8f5c804fc3dbf097395c4c8e9aa860d/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 9ca66c6ee8f5c804fc3dbf097395c4c8e9aa860d in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/19175117a74890c9343ce27c387c2ebb1d8a085c/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 19175117a74890c9343ce27c387c2ebb1d8a085c in #86. cc @Raffaello.
todo[bot] commented 4 years ago

balancing string adding "..." to their max size. ?

https://github.com/Raffaello/sdl2-vga-terminal/blob/77f2bb4a992438b62f50ca5073d1b0ed04355838/sdl2-vga-terminal/src/tui/utils.cpp#L24-L29


This comment was generated by todo based on a TODO comment in 77f2bb4a992438b62f50ca5073d1b0ed04355838 in #86. cc @Raffaello.
ghost commented 4 years ago

DeepCode's analysis on #ce155c found:

1 minor issue.

👉 View analysis in DeepCode’s Dashboard

:relaxed: If you want to provide feedback on our bot, here is how to contact us.

Raffaello commented 4 years ago

Codacy Here is an overview of what got changed by this pull request:


Clones added
============
- sdl2-vga-terminal/test/tui/utilsTest.cpp  2
- sdl2-vga-terminal/src/TuiTerminal.cpp  6
- sdl2-vga-terminal/test/VgaTerminalTest.cpp  8

See the complete overview on Codacy

sonarcloud[bot] commented 4 years ago

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 10 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Raffaello commented 4 years ago

the todobot did not created the the todo issues.... 🤖 ⚠️