Skip to content

Commit

Permalink
Merge pull request #49 from cinnabar-engine/hotfix/quality
Browse files Browse the repository at this point in the history
Hotfix/quality
  • Loading branch information
tumble1999 authored Aug 31, 2021
2 parents cd33cda + 694c874 commit f410030
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 46 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
cp -r doxygen-out/html/* docs
- name: commit
continue-on-error: true
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
Expand Down
66 changes: 38 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#
name: "Code Quality"

on:
[push]
on: [push]
jobs:
analyze:
name: Analyze
Expand All @@ -25,40 +24,51 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
language: ["cpp"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y
chmod +x github-scripts/debian.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Configure
run: |
github-scripts/debian.sh configure
- name: Build
run: |
github-scripts/debian.sh build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions docs/tpnt__log_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#a8d60bc34d9c59ec9ab40ac3a
<b>Value:</b><div class="fragment"><div class="line"> printf(<a class="code" href="tpnt__log_8h.html#a8679fadc34fbec1f4293ca00695e0a4c">TPNT_LOGGER_FORMAT</a>, (LOGTYPE), <a class="code" href="tpnt__log_8h.html#acef4c497fcba30e62351f035aba1cd0c">TPNT_LOGGER_CONTEXT</a>); \</div>
<div class="line"> printf(__VA_ARGS__); \</div>
<div class="line"> putchar(<span class="charliteral">&#39;\n&#39;</span>)</div>
<div class="ttc" id="atpnt__log_8h_html_a8679fadc34fbec1f4293ca00695e0a4c"><div class="ttname"><a href="tpnt__log_8h.html#a8679fadc34fbec1f4293ca00695e0a4c">TPNT_LOGGER_FORMAT</a></div><div class="ttdeci">#define TPNT_LOGGER_FORMAT</div><div class="ttdef"><b>Definition:</b> tpnt_log.h:21</div></div>
<div class="ttc" id="atpnt__log_8h_html_acef4c497fcba30e62351f035aba1cd0c"><div class="ttname"><a href="tpnt__log_8h.html#acef4c497fcba30e62351f035aba1cd0c">TPNT_LOGGER_CONTEXT</a></div><div class="ttdeci">#define TPNT_LOGGER_CONTEXT</div><div class="ttdef"><b>Definition:</b> tpnt_log.h:23</div></div>
<div class="ttc" id="atpnt__log_8h_html_a8679fadc34fbec1f4293ca00695e0a4c"><div class="ttname"><a href="tpnt__log_8h.html#a8679fadc34fbec1f4293ca00695e0a4c">TPNT_LOGGER_FORMAT</a></div><div class="ttdeci">#define TPNT_LOGGER_FORMAT</div><div class="ttdef"><b>Definition:</b> tpnt_log.h:25</div></div>
<div class="ttc" id="atpnt__log_8h_html_acef4c497fcba30e62351f035aba1cd0c"><div class="ttname"><a href="tpnt__log_8h.html#acef4c497fcba30e62351f035aba1cd0c">TPNT_LOGGER_CONTEXT</a></div><div class="ttdeci">#define TPNT_LOGGER_CONTEXT</div><div class="ttdef"><b>Definition:</b> tpnt_log.h:27</div></div>
</div><!-- fragment -->
</div>
</div>
Expand Down
37 changes: 21 additions & 16 deletions docs/tpnt__log_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,27 @@
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8679fadc34fbec1f4293ca00695e0a4c"> 21</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_FORMAT &quot;[%s][%s:%d|%s]: &quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a753714f54a70c33c4266b20b3d324161"> 22</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_FILE strrchr(__FILE__, &#39;/&#39;) ? strrchr(__FILE__, &#39;/&#39;) + 1 : __FILE__</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#acef4c497fcba30e62351f035aba1cd0c"> 23</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_CONTEXT TPNT_LOGGER_FILE, __LINE__, __FUNCTION__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8d60bc34d9c59ec9ab40ac3a7d9255d0"> 24</a></span>&#160;<span class="preprocessor">#define TPNT_LOG(LOGTYPE, ...) \</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor"> printf(TPNT_LOGGER_FORMAT, (LOGTYPE), TPNT_LOGGER_CONTEXT); \</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor"> printf(__VA_ARGS__); \</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor"> putchar(&#39;\n&#39;)</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#acdc4f2aea29e24207d236bdaa2574417"> 28</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_RESET &quot;\033[0m&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ab0281efe267c67734146d54e868262c8"> 29</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_SUCCESS &quot;\033[1;32m&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8ab465c55945d8575ccd381f823d33a6"> 30</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_WARN &quot;\033[1;33m&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ab7b8bad5ca957a272fb0435cff17d9d2"> 31</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_ERROR &quot;\033[1;31m&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a378e28bfcb78d17285210d6bbb70a083"> 33</a></span>&#160;<span class="preprocessor">#define LOG_INFO(...) TPNT_LOG(&quot;INFO&quot;</span>, __VA_ARGS__)</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#add82efa459e0af380b68522c29b9fd44"> 34</a></span>&#160;<span class="preprocessor">#define LOG_WARN(...) TPNT_LOG(TPNT_LOG_WARN &quot;WARN&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ad4a9117ce894e3319e903142347a0f63"> 35</a></span>&#160;<span class="preprocessor">#define LOG_ERROR(...) TPNT_LOG(TPNT_LOG_ERROR &quot;ERROR&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#abe49b9668471444c5b5da3dba169c8a0"> 36</a></span>&#160;<span class="preprocessor">#define LOG_SUCCESS(...) TPNT_LOG(TPNT_LOG_SUCCESS &quot;SUCCESS&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#ifdef NDEBUG</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#define TPNT_LOGGER_FORMAT &quot;[%s]: &quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define TPNT_LOGGER_CONTEXT __LINE__, __FUNCTION__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8679fadc34fbec1f4293ca00695e0a4c"> 25</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_FORMAT &quot;[%s][%s:%d|%s]: &quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a753714f54a70c33c4266b20b3d324161"> 26</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_FILE strrchr(__FILE__, &#39;/&#39;) ? strrchr(__FILE__, &#39;/&#39;) + 1 : __FILE__</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#acef4c497fcba30e62351f035aba1cd0c"> 27</a></span>&#160;<span class="preprocessor">#define TPNT_LOGGER_CONTEXT TPNT_LOGGER_FILE, __LINE__, __FUNCTION__</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8d60bc34d9c59ec9ab40ac3a7d9255d0"> 29</a></span>&#160;<span class="preprocessor">#define TPNT_LOG(LOGTYPE, ...) \</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor"> printf(TPNT_LOGGER_FORMAT, (LOGTYPE), TPNT_LOGGER_CONTEXT); \</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor"> printf(__VA_ARGS__); \</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor"> putchar(&#39;\n&#39;)</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#acdc4f2aea29e24207d236bdaa2574417"> 33</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_RESET &quot;\033[0m&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ab0281efe267c67734146d54e868262c8"> 34</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_SUCCESS &quot;\033[1;32m&quot;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a8ab465c55945d8575ccd381f823d33a6"> 35</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_WARN &quot;\033[1;33m&quot;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ab7b8bad5ca957a272fb0435cff17d9d2"> 36</a></span>&#160;<span class="preprocessor">#define TPNT_LOG_ERROR &quot;\033[1;31m&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#a378e28bfcb78d17285210d6bbb70a083"> 38</a></span>&#160;<span class="preprocessor">#define LOG_INFO(...) TPNT_LOG(&quot;INFO&quot;</span>, __VA_ARGS__)</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#add82efa459e0af380b68522c29b9fd44"> 39</a></span>&#160;<span class="preprocessor">#define LOG_WARN(...) TPNT_LOG(TPNT_LOG_WARN &quot;WARN&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#ad4a9117ce894e3319e903142347a0f63"> 40</a></span>&#160;<span class="preprocessor">#define LOG_ERROR(...) TPNT_LOG(TPNT_LOG_ERROR &quot;ERROR&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="tpnt__log_8h.html#abe49b9668471444c5b5da3dba169c8a0"> 41</a></span>&#160;<span class="preprocessor">#define LOG_SUCCESS(...) TPNT_LOG(TPNT_LOG_SUCCESS &quot;SUCCESS&quot;</span> TPNT_LOG_RESET, __VA_ARGS__)</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
Expand Down

0 comments on commit f410030

Please sign in to comment.