Skip to content

Commit

Permalink
Merge branch 'latest' of github.com:rmknan/stumpless into 272
Browse files Browse the repository at this point in the history
  • Loading branch information
rmknan committed Sep 28, 2023
2 parents 359b3fe + 117ee5d commit 67572e7
Show file tree
Hide file tree
Showing 35 changed files with 349 additions and 52 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONARQUBE_SCANNER_PARAMS: '{"sonar.host.url":"https://sonarcloud.io"}'
custom-anaysis:
name: Custom Analysis
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "@since standardization"
run: |
# look for all instances of @since, then look for any that do not meet the required pattern. @since release x.x.x
if grep --include=\*.{c,h,cpp,hpp} -rnw . -e ".*@since .*" | grep -qv ".* @since release v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]].*"; then
# at this point the check has failed, but we want to give some info to the user. i have found it difficult to get the status code
# and print out the offending lines without this duplication
# get all instances of @since, offending and not offending
grep --include=\*.{c,h,cpp,hpp} -rnw . -e "@since .*" | \
# find all instances that do not meet the required pattern
grep -v ".* @since release v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]].*" | \
# print an error message, including line number with -n from grep. mention supported format.
xargs -I{} echo "Static Analysis Failed: \"{}\" Supported format is \"@since release vX.X.X\""
exit 1
else
exit 0
fi
4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ All notable changes to stumpless will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
For a detailed look at the project's future, including planned features and bug
fixes, check out the
[roadmap](https://github.com/goatshriek/stumpless/blob/master/docs/roadmap.md).


## [2.2.0] - 2023-08-08
### Added
- @since format check enforcement in CI pipeline.
### Fixed
- Deadlock potential in `stumpless_set_entry_hostname` and
`stumpless_set_entry_procid` when validation fails.
Expand Down
4 changes: 2 additions & 2 deletions include/private/config/journald_supported.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* This function is safe to call from threads that may be asynchronously
* cancelled.
*
* @since v2.1.0
* @since release v2.1.0
*
* @param element The element to initialize.
*/
Expand All @@ -57,7 +57,7 @@ journald_init_journald_element( struct stumpless_element *element );
* This function is safe to call from threads that may be asynchronously
* cancelled.
*
* @since v2.1.0
* @since release v2.1.0
*
* @param param The param to initialize.
*/
Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/bg-bg.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"невалидната тежест"

Expand Down
10 changes: 7 additions & 3 deletions include/private/config/locale/bn-in.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

#ifndef __STUMPLESS_PRIVATE_CONFIG_LOCALE_EN_US_H
# define __STUMPLESS_PRIVATE_CONFIG_LOCALE_EN_US_H
#ifndef __STUMPLESS_PRIVATE_CONFIG_LOCALE_BN_IN_H
# define __STUMPLESS_PRIVATE_CONFIG_LOCALE_BN_IN_H

# define L10N_BIND_UNIX_SOCKET_FAILED_ERROR_MESSAGE \
"স্থানীয় ইউনিক্স সকেটের"\
Expand Down Expand Up @@ -113,6 +113,10 @@
"একটি MULTI_SZ রেজিস্ট্রি মান খালি ছিল না" \
"বা দুটি NULL অক্ষর দিয়ে শেষ করা হয়নি"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"অসফল severity"

Expand Down Expand Up @@ -259,4 +263,4 @@ L"উইন্ডোজ ইভেন্ট লগ সোর্সের স্
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"ব্যর্থ কলের পরে WSAGEtLastError এর ফলাফল"

#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_BN_IN_H */
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_BN_IN_H */
6 changes: 5 additions & 1 deletion include/private/config/locale/cz-cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"neplatná služba"

Expand Down Expand Up @@ -268,4 +272,4 @@ L"Stumpless registration of Windows Event Log Source"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"výsledek WSAGetLastError po selhání volání"

#endif //STUMPLESS_CZ_CZ_H
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_CZ_CZ_H */
4 changes: 4 additions & 0 deletions include/private/config/locale/da-dk.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
"en MULTI_SZ registreringsdatabase værdi var hverken tom eller Afsluttet " \
" characters med to NULL's"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"den ugyldige alvorlighed"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/de-de.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"Ungültiger Schweregrad"

Expand Down
6 changes: 5 additions & 1 deletion include/private/config/locale/el-gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"μη έγκυρη σοβαρότητα"

Expand Down Expand Up @@ -271,4 +275,4 @@ L"Stumpless registration of Windows Event Log Source"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"το αποτέλεσμα της WSAGetLastError εφόσον απότυχε η κλήση της συνάρτησης"

#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_EN_US_H */
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_EL_GR_H */
3 changes: 3 additions & 0 deletions include/private/config/locale/en-us.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"the invalid severity"

Expand Down
6 changes: 5 additions & 1 deletion include/private/config/locale/es-es.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
# define L10N_INVALID_MULTI_SZ_ERROR_MESSAGE \
"un valor de registro MULTI_SZ no estaba ni vacío ni terminado con dos NULL"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"la gravedad inválida"

Expand Down Expand Up @@ -253,4 +257,4 @@ L"registro de Stumpless del Registro de Eventos de Windows"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"el resultado de WSAGetLastError despues que la llamada fallara"

#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_ES_ES_H */
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_ES_ES_H */
4 changes: 4 additions & 0 deletions include/private/config/locale/fr-fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
# define L10N_INVALID_MULTI_SZ_ERROR_MESSAGE \
"la valeur d'un registre MULTI_SZ n'était ni vide ni terminée par deux NULL"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"la sévérité invalide"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/he-il.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
# define L10N_INVALID_MULTI_SZ_ERROR_MESSAGE \
"NULL לא היה ריק ולא הסתיים עם שני תווי MULTI_SZ ערך רישום של"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"שאינו חוקי Severity-ה"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/hi-in.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
"एक MULTI_SZ रजिस्ट्री मान न तो खाली था और न ही दो NULL" \
" अक्षर "

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"अमान्य गंभीरता"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/it-it.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
"un valore MULTI_SZ nel registro non è nè vuoto nè terminato con due" \
" caratteri nullo"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"gravità non valida"

Expand Down
6 changes: 5 additions & 1 deletion include/private/config/locale/pl-pl.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"nieprawidłowa usługa"

Expand Down Expand Up @@ -271,4 +275,4 @@ L"Stumpless registration of Windows Event Log Source"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"wynik WSAGetLastError po niepowodzeniu połączenia"

#endif //STUMPLESS_PL_PL_H
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_PL_PL_H */
6 changes: 5 additions & 1 deletion include/private/config/locale/pt-br.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
"um valor de registro MULTI_SZ não estava nem vazio nem finalizado" \
"com dois caracteres NULL"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"a gravidade inválida"

Expand Down Expand Up @@ -253,4 +257,4 @@ L"Registro do Stumpless no Windows Event Log Source"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"o resultado de WSAGetLastError depois da chamada com erro"

#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_EN_US_H */
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_PT_BR_H */
6 changes: 5 additions & 1 deletion include/private/config/locale/sk-sk.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"neplatná služba"

Expand Down Expand Up @@ -284,4 +288,4 @@ L"Stumpless registration of Windows Event Log Source"
# define L10N_WSAGETLASTERROR_ERROR_CODE_TYPE \
"výsledok WSAGetLastError po zlyhaní volania"

#endif //STUMPLESS_SK_SK_H
#endif /* __STUMPLESS_PRIVATE_CONFIG_LOCALE_SK_SK_H */
4 changes: 4 additions & 0 deletions include/private/config/locale/sv-se.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
"a MULTI_SZ registry value was neither empty nor terminated with two NULL" \
" characters"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"den ogiltiga allvarligheten"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/sw-ke.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
"thamani ya usajili wa MULTI_SZ haikuwa tupu wala haikumalizika na herufi" \
" mbili za NULL"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"ukali batili"

Expand Down
4 changes: 4 additions & 0 deletions include/private/config/locale/zh-cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
# define L10N_INVALID_MULTI_SZ_ERROR_MESSAGE \
"MULTI_SZ注册表值既不为空,也不以两个NULL字符结束"

// todo translate
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
"the string is not of the name=\"value\" format"

# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
"severity无效"

Expand Down
6 changes: 5 additions & 1 deletion include/private/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ COLD_FUNCTION
void
raise_invalid_id( void );

COLD_FUNCTION
void
raise_invalid_param( void );

COLD_FUNCTION
void
raise_invalid_severity( int severity );
Expand Down Expand Up @@ -313,7 +317,7 @@ raise_windows_failure( const char *message, int code, const char *code_type );
* cancelled, as the lock used to control access to the error stream may not
* be released after a cancellation.
*
* @since v2.1.0.
* @since release v2.1.0.
*
* @param msg The message to be written to the error stream.
*
Expand Down
Loading

0 comments on commit 67572e7

Please sign in to comment.