Now that all of mozilla-central is been migrated to use clang-format automated code formatting, the question of what should happen with editor modelines at the top of files should be considered.
https://bugzilla.mozilla.org/show_bug.cgi?id=clang-format Here are some options and some arguments I've heard. Please reply with further ideas or rationale. I've not classified points as pro/con and leave that up to the reader's interpretation. Option 1: Remove mode lines - Devs are expected to run clang-format anyways (hopefully automated with a hook of sorts) - Devs are free to set their modeline configuration elsewhere - If they aren't providing value, they deserve to be removed. - Many of these were already inconsistent/wrong, so this might be an opportunity to phase out - Not all devs use vim/emacs, so we should think about workflows help that doesn't need stuff in every single source file. - The editorconfig project (https://editorconfig.org/) aims to solve this for a variety of editors without marking each file Option 2: Fix mode lines - A correct text-width mode-line gives a closer first approximation for devs - Certain files (eg. moz.build, obj-C headers) use a non-standard file types. A hybrid of these is also very possible, such as removing certain attributes or only using when file type is non-standard. I had originally intended this discussion for js/ components, but it turns out to be a question across the whole tree (even if the solution chosen is per-module). --Ted _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform