Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OpenGeode): update to new warnings #133

Merged
merged 3 commits into from
Sep 23, 2024
Merged

fix(OpenGeode): update to new warnings #133

merged 3 commits into from
Sep 23, 2024

Conversation

BotellaA
Copy link
Member

No description provided.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 34. Check the log or trigger a new build to see more.


public:
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/fault.hpp:51: previously declared here

    public:
    ^

{
return { this->component_type_static(), this->id() };
};

FaultBlock( FaultBlocksKey ) : FaultBlock(){};
public:
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/fault_block.hpp:51: previously declared here

    public:
    ^

{
return { this->component_type_static(), this->id() };
};

FaultBlock( FaultBlocksKey ) : FaultBlock(){};
public:
FaultBlock( FaultBlocksKey ) : FaultBlock() {};
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
FaultBlock( FaultBlocksKey ) : FaultBlock() {};
FaultBlock( FaultBlocksKey /*unused*/) : FaultBlock() {};


public:
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/horizon.hpp:51: previously declared here

    public:
    ^

@@ -44,8 +44,8 @@ namespace geode
* The adequate loader is called depending on the filename extension.
* @param[in] filename Path to the file to load.
*/
CrossSection opengeode_geosciences_explicit_api load_cross_section(
std::string_view filename );
[[nodiscard]] CrossSection opengeode_geosciences_explicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_explicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] CrossSection opengeode_geosciences_explicit_api
                               ^

@@ -59,11 +59,12 @@
}
};

ImplicitCrossSectionInput::MissingFiles opengeode_geosciences_implicit_api
[[nodiscard]] ImplicitCrossSectionInput::MissingFiles
opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        opengeode_geosciences_implicit_api
        ^

check_implicit_cross_section_missing_files( std::string_view filename );

bool opengeode_geosciences_implicit_api is_implicit_cross_section_loadable(
std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

: Output< ImplicitCrossSection >{ filename }
{
}
};

bool opengeode_geosciences_implicit_api is_implicit_cross_section_saveable(
const ImplicitCrossSection& section, std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

@@ -42,7 +42,7 @@ namespace geode
* The adequate loader is called depending on the filename extension.
* @param[in] filename Path to the file to load.
*/
ImplicitStructuralModel opengeode_geosciences_implicit_api
[[nodiscard]] ImplicitStructuralModel opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] ImplicitStructuralModel opengeode_geosciences_implicit_api
                                          ^

opengeode_geosciences_implicit_api
check_implicit_structural_model_missing_files(
std::string_view filename );

bool opengeode_geosciences_implicit_api
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

@BotellaA BotellaA requested a review from panquez September 20, 2024 11:18
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

: Output< ImplicitStructuralModel >{ filename }
{
}
};

bool opengeode_geosciences_implicit_api
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

@@ -42,7 +42,7 @@ namespace geode
* The adequate loader is called depending on the filename extension.
* @param[in] filename Path to the file to load.
*/
StratigraphicModel opengeode_geosciences_implicit_api
[[nodiscard]] StratigraphicModel opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] StratigraphicModel opengeode_geosciences_implicit_api
                                     ^

@@ -59,11 +59,12 @@
}
};

StratigraphicModelInput::MissingFiles opengeode_geosciences_implicit_api
[[nodiscard]] StratigraphicModelInput::MissingFiles
opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        opengeode_geosciences_implicit_api
        ^

check_stratigraphic_model_missing_files( std::string_view filename );

bool opengeode_geosciences_implicit_api is_stratigraphic_model_loadable(
std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

bool opengeode_geosciences_implicit_api is_stratigraphic_model_saveable(
const StratigraphicModel& stratigraphic_model,
std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

@@ -42,7 +42,7 @@ namespace geode
* The adequate loader is called depending on the filename extension.
* @param[in] filename Path to the file to load.
*/
StratigraphicSection opengeode_geosciences_implicit_api
[[nodiscard]] StratigraphicSection opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] StratigraphicSection opengeode_geosciences_implicit_api
                                       ^

@@ -59,11 +59,12 @@
}
};

StratigraphicSectionInput::MissingFiles opengeode_geosciences_implicit_api
[[nodiscard]] StratigraphicSectionInput::MissingFiles
opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        opengeode_geosciences_implicit_api
        ^

check_stratigraphic_section_missing_files( std::string_view filename );

bool opengeode_geosciences_implicit_api is_stratigraphic_section_loadable(
std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

bool opengeode_geosciences_implicit_api is_stratigraphic_section_saveable(
const StratigraphicSection& stratigraphic_section,
std::string_view filename );
[[nodiscard]] bool opengeode_geosciences_implicit_api
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'opengeode_geosciences_implicit_api' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

    [[nodiscard]] bool opengeode_geosciences_implicit_api
                       ^

@MelchiorSchuh MelchiorSchuh merged commit f4b30fd into next Sep 23, 2024
18 checks passed
@MelchiorSchuh MelchiorSchuh deleted the fix/nodiscard branch September 23, 2024 08:29
@panquez
Copy link
Member

panquez commented Sep 23, 2024

🎉 This PR is included in version 8.0.2-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@panquez
Copy link
Member

panquez commented Sep 24, 2024

🎉 This PR is included in version 8.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants