Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!volia.net!news2.volia.net!feed-A.news.volia.net!news2.dg.net.ua!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1952509.RcUan3lTt2@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 18 Dec 2011 23:09:32 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: Break for last case in switch Newsgroups: comp.lang.javascript References: <758d8d3d-1b7d-46a8-8dc7-8f5764138efc@q16g2000yqn.googlegroups.com> <2014557.oCFFeib8bu@PointedEars.de> <3028473.Ge26DHhYnv@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 49 NNTP-Posting-Date: 18 Dec 2011 23:09:34 CET NNTP-Posting-Host: ce825edd.newsspool4.arcor-online.net X-Trace: DXC=QDad_QleXAVYI9]OHn9o5^4IUK Stefan Weiss wrote: >> Thomas 'PointedEars' Lahn wrote: >>> Stefan Weiss wrote: >>>> JavaScript Lint is mistaken. >>> You are mistaken. >> >> No. Please re-read what I wrote. I said: > > Please re-read what you have replied to in the first place. > >>>> A 'break;' at the end of the last clause in a switch statement would be >>>> redundant. >> >> I did _not_ say "at the end of the default clause". > > The "last case" in the original code is the `default' clause. ISTM *that* > was here the missing `break' statement was being warned about. Rather > ambiguously for sure, but there it was. And regardless of the misconceptions of a well-known wannabe, that is exactly what happened here. shows *two* warnings for this code – Line 3, column 1: "lint warning: missing semicolon" Line 8, column 1: "lint warning: missing break statement for last case in switch" – while, if the `break' statement in the last `case' clause is omitted, it shows *three* warnings: Line 3, column 1: "lint warning: missing semicolon" Line 6, column 9: "lint warning: missing break statement" Line 8, column 1: "lint warning: missing break statement for last case in switch" So it is not a bug, it is a feature. A questionable feature because it uses ambiguous wording, but there it is. PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann