[dev-servo] Re-enable non_snake_case warnings?

2020-01-09 Thread Josh Matthews
After coming across an instance of a non-snake case variable name that 
didn't trigger any compiler warnings, I discovered that we disabled that 
warning for the script crate 5 years ago 
(https://github.com/servo/servo/commit/dc86e8365495acc87b983a290bb7277a37a5247f#diff-7efb30b262e93375ff2af348d5a870f9R11). 
Any objections to re-enabling it in Servo-specific code throughout the 
project and fixing the existing instances?


Cheers,
Josh
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Re-enable non_snake_case warnings?

2020-01-09 Thread Simon Sapin

On 09/01/2020 22:33, Josh Matthews wrote:

After coming across an instance of a non-snake case variable name that
didn't trigger any compiler warnings, I discovered that we disabled that
warning for the script crate 5 years ago
(https://github.com/servo/servo/commit/dc86e8365495acc87b983a290bb7277a37a5247f#diff-7efb30b262e93375ff2af348d5a870f9R11).
Any objections to re-enabling it in Servo-specific code throughout the
project and fixing the existing instances?


No objection, but fixing may be non-trivial. Changing that `allow` to `deny` 
produces:

error: aborting due to 368 previous errors

It looks like many of these names are generated from WebIDL, so this might require 
codegen change (not just renames in source code).


--
Simon
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Re-enable non_snake_case warnings?

2020-01-09 Thread Cheng You Bai
No objection either! but, currently, there are some functions which will be
communicated with mozjs bindings are named in camel case.
Would it be good to keep them in camel case way? (ex.
*HostResolveImportedModule* for *SetModuleResolveHook*)

On Fri, Jan 10, 2020 at 5:59 AM Simon Sapin  wrote:

> On 09/01/2020 22:33, Josh Matthews wrote:
> > After coming across an instance of a non-snake case variable name that
> > didn't trigger any compiler warnings, I discovered that we disabled that
> > warning for the script crate 5 years ago
> > (
> https://github.com/servo/servo/commit/dc86e8365495acc87b983a290bb7277a37a5247f#diff-7efb30b262e93375ff2af348d5a870f9R11
> ).
> > Any objections to re-enabling it in Servo-specific code throughout the
> > project and fixing the existing instances?
>
> No objection, but fixing may be non-trivial. Changing that `allow` to
> `deny` produces:
>
>  error: aborting due to 368 previous errors
>
> It looks like many of these names are generated from WebIDL, so this might
> require
> codegen change (not just renames in source code).
>
> --
> Simon
> ___
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>
___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo