diff --git a/.github/workflows/update_name.yml b/.github/workflows/update_name.yml deleted file mode 100644 index 9b31788..0000000 --- a/.github/workflows/update_name.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2024 Khalil Estell -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 🖋️ Update package name - -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - update_name: - name: 🖋️ Update package name - runs-on: ubuntu-latest - if: github.repository != 'libhal/libhal-__device__' - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - run: sudo apt install rename - - - name: Get device name from repo name - id: device_name - run: echo ${{ github.event.repository.name }} | sed -En "s/libhal-(.*)/device_name=\1/p" >> $GITHUB_ENV - - - name: Replace placeholder's in files - run: find . -type f -not -path '*/\.git/*' -exec sed -i "s/__device__/${{ env.device_name }}/g" {} + - - - name: Replace "// NOLINT" in files - run: find . -type f -not -path '*/\.git/*' -exec sed -i "s/[ ]*\/\/ NOLINT//g" {} + - - - name: Replace placeholder's in directory names - run: find . -type d -not -path '*/\.git/*' | xargs -r rename "s/__device__/${{ env.device_name }}/g" - - - name: Replace placeholder's in file names - run: find . -type f -not -path '*/\.git/*' | xargs -r rename "s/__device__/${{ env.device_name }}/g" - - - name: Remove update_name.yml file - run: rm .github/workflows/update_name.yml - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - title: "Rename device package to libhal-${{ env.device_name }}" diff --git a/include/navigator/navigator.hpp b/include/navigator/navigator.hpp index 0c4f574..9f30a5a 100644 --- a/include/navigator/navigator.hpp +++ b/include/navigator/navigator.hpp @@ -14,7 +14,7 @@ #pragma once -namespace hal::navigator { // NOLINT -class navigator // NOLINT +namespace hal::navigator { +class navigator {}; } // namespace hal::navigator diff --git a/src/navigator.cpp b/src/navigator.cpp index 3790f32..11dcf4e 100644 --- a/src/navigator.cpp +++ b/src/navigator.cpp @@ -14,5 +14,5 @@ #include "navigator/navigator.hpp" -namespace hal::navigator { // NOLINT +namespace hal::navigator { } // namespace hal::navigator diff --git a/tests/__device__.test.cpp b/tests/.test.cpp similarity index 91% rename from tests/__device__.test.cpp rename to tests/.test.cpp index 8206ebd..90b0601 100644 --- a/tests/__device__.test.cpp +++ b/tests/.test.cpp @@ -16,8 +16,8 @@ #include -namespace hal::navigator { // NOLINT -void navigator_test() // NOLINT +namespace hal::navigator { +void navigator_test() { using namespace boost::ut; using namespace std::literals; diff --git a/tests/main.test.cpp b/tests/main.test.cpp index a603914..386897c 100644 --- a/tests/main.test.cpp +++ b/tests/main.test.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -namespace hal::navigator { // NOLINT -extern void navigator_test(); // NOLINT +namespace hal::navigator { +extern void navigator_test(); } // namespace hal::navigator int main()