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

When not providing any section in coafiles remove warning message of the deprecated Default section #5309

Open
ishanSrt opened this issue Apr 4, 2018 · 10 comments
Assignees

Comments

@ishanSrt
Copy link
Contributor

ishanSrt commented Apr 4, 2018

No description provided.

@nityeshaga
Copy link
Contributor

nityeshaga commented Apr 4, 2018

The Default section has been deprecated and has been replaced with cli now. This is the warning message that is being printed now:

[WARNING][12:41:08] 'cli' is an internally reserved section name. It may have been generated into your coafile while running coala with `--save`. The settings in that section will inherit implicitly to all sections as defaults just like CLI args do. Please change the name of that section in your coafile to avoid any unexpected behavior.

IMHO this warning is necessary.
For more details you may want to check out this PR- coala/documentation#537 😉

@ishanSrt
Copy link
Contributor Author

ishanSrt commented Apr 4, 2018

sorry @nityeshaga didn't quite get you on that one

@ishanSrt
Copy link
Contributor Author

ishanSrt commented Apr 4, 2018

When I am not providing any section, coala is automatically assuming it to be inside a default section and thus complaining that we have used it.

@nityeshaga
Copy link
Contributor

Okay now I get you @ishanSrt

I think that earlier, when the Default section was not deprecated, coala assumed that a setting belonged to the Default section if no section was explicitly specified for it. Thus, it got all the inheritance facilities that any other setting of the Default section used to enjoy.

Hence, now that the Default section is deprecated, coala gives the warning message that you mentioned above.

@nityeshaga
Copy link
Contributor

So, if we remove the warning message like you said, then which section will such a setting belong to?
Maybe we should discuss this on gitter 😉

@ishanSrt
Copy link
Contributor Author

ishanSrt commented Apr 4, 2018

actually I want to be assigned to this and I am already preparing a PR, I am just calling it NO SECTION PROVIDED for now

ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
ishanSrt added a commit to ishanSrt/coala that referenced this issue Apr 4, 2018
When no section is provided, coala considers it automatically
under ``Default`` section which provides an additional warning
message about the deprecation of the ``Default`` section. This
commit removes this ambiguity and defines section name of
the settings under no section to be ``NO SECTION PROVIDED``

Closes coala#5309
@jayvdb
Copy link
Member

jayvdb commented Apr 7, 2018

Hold up, the "Default" section is the configuration settings which are before any section header. Those settings are assumed to be in a "Default" section, even if they were not put in one.

The messages might be improved, but the implicit section name should not be changed, and a warning is needed, as this is going to be removed in the future.

@jayvdb
Copy link
Member

jayvdb commented May 1, 2018

We really need @Udayan12167 to clarify what should be done here.

@ishanSrt
Copy link
Contributor Author

ishanSrt commented May 1, 2018

@jayvdb I was going to provide 2 warnings for this as per the discussion on gitter,

  • Unsectioned settings are considered under Default section
  • cli is the new Default as the unsectioned settings are being shown in the cli section

@duker33
Copy link

duker33 commented Oct 25, 2019

Hold up, the "Default" section is the configuration settings which are before any section header. Those settings are assumed to be in a "Default" section, even if they were not put in one.

@jayvdb , the same error is shown because of comment. It's slightly differs from your point, i suppose

My .coafile file has this structure:

# comment

[all]
...

[all.python]
...

[all.javascript]
...

My whole settings file is there

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

No branches or pull requests

4 participants