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 #19580; add warning for bare except: clause #21099

Merged
merged 10 commits into from
Dec 15, 2022
Merged

fix #19580; add warning for bare except: clause #21099

merged 10 commits into from
Dec 15, 2022

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Dec 14, 2022

fix #19580
supersedes #19582

doc/manual.md Outdated Show resolved Hide resolved
doc/manual.md Outdated Show resolved Hide resolved
doc/manual.md Show resolved Hide resolved
doc/manual.md Outdated Show resolved Hide resolved
doc/manual.md Outdated Show resolved Hide resolved
changelog.md Outdated Show resolved Hide resolved
doc/tut2.md Outdated Show resolved Hide resolved
compiler/semstmts.nim Outdated Show resolved Hide resolved
doc/manual.md Outdated Show resolved Hide resolved
doc/tut2.md Outdated Show resolved Hide resolved
tests/nimdoc/trunnableexamples.nim Outdated Show resolved Hide resolved
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
doc/tut2.md Outdated Show resolved Hide resolved
@Araq Araq merged commit 91ce8c3 into devel Dec 15, 2022
@Araq Araq deleted the pr_warn_excpt branch December 15, 2022 05:45
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 91ce8c3

Hint: mm: orc; opt: speed; options: -d:release
165588 lines; 7.911s; 612.727MiB peakmem

while t.kind == tyObject:
if t.sym != nil and t.sym.owner != nil and
sfSystemModule in t.sym.owner.flags and
(t.sym.name.s == "Defect" or
Copy link
Collaborator

Choose a reason for hiding this comment

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

s.name.id == getIdent(c.graph.cache, "Defect").id better avoiding string comparation ?

Copy link
Member

Choose a reason for hiding this comment

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

No.

@arnetheduck
Copy link
Contributor

@narimiran can we backport pls?

narimiran pushed a commit that referenced this pull request Dec 15, 2022
* fix #19580; add warning for bare except: clause

* fixes some easy ones

* Update doc/manual.md

* fixes docs

* Update changelog.md

* addition

* Apply suggestions from code review

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Update doc/tut2.md

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
(cherry picked from commit 91ce8c3)
@narimiran
Copy link
Member

@narimiran can we backport pls?

Done!

@Menduist
Copy link
Contributor

Look like the backport broke 1-6 :/ Maybe just remove the compiler/nim.cfg in the backport?

@narimiran
Copy link
Member

Maybe just remove the compiler/nim.cfg in the backport?

Done!

survivorm pushed a commit to survivorm/Nim that referenced this pull request Feb 28, 2023
* fix nim-lang#19580; add warning for bare except: clause

* fixes some easy ones

* Update doc/manual.md

* fixes docs

* Update changelog.md

* addition

* Apply suggestions from code review

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Update doc/tut2.md

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
* fix nim-lang#19580; add warning for bare except: clause

* fixes some easy ones

* Update doc/manual.md

* fixes docs

* Update changelog.md

* addition

* Apply suggestions from code review

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Update doc/tut2.md

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
bung87 pushed a commit to bung87/Nim that referenced this pull request Jul 29, 2023
* fix nim-lang#19580; add warning for bare except: clause

* fixes some easy ones

* Update doc/manual.md

* fixes docs

* Update changelog.md

* addition

* Apply suggestions from code review

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Update doc/tut2.md

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add warning for bare except: clause
6 participants