Style guides for Google-originated open-source projects

Overview

Google Style Guides

Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style.

“Style” covers a lot of ground, from “use camelCase for variable names” to “never use global variables” to “never use exceptions.” This project (google/styleguide) links to the style guidelines we use for Google code. If you are modifying a project that originated at Google, you may be pointed to this page to see the style guides that apply to that project.

This project holds the C++ Style Guide, C# Style Guide, Swift Style Guide, Objective-C Style Guide, Java Style Guide, Python Style Guide, R Style Guide, Shell Style Guide, HTML/CSS Style Guide, JavaScript Style Guide, TypeScript Style Guide, AngularJS Style Guide, Common Lisp Style Guide, and Vimscript Style Guide. This project also contains cpplint, a tool to assist with style guide compliance, and google-c-style.el, an Emacs settings file for Google style.

If your project requires that you create a new XML document format, the XML Document Format Style Guide may be helpful. In addition to actual style rules, it also contains advice on designing your own vs. adapting an existing format, on XML instance document formatting, and on elements vs. attributes.

The style guides in this project are licensed under the CC-By 3.0 License, which encourages you to share these documents. See https://creativecommons.org/licenses/by/3.0/ for more details.

The following Google style guides live outside of this project: Go Code Review Comments and Effective Dart.

Creative Commons License

Comments
  • Fix the `cpplint.py` `build/endif_comment` check.

    Fix the `cpplint.py` `build/endif_comment` check.

    • The check needs to be run before we remove comments, otherwise valid lines will be found as invalid.
    • A single character different from / after the spaces is enough to indicate an error.
    • Also catch errors when only one / is present. (For example #endif / MY_FILE_H.)

    Tested with:

    // Correct
    
    #endif// FOO_1
    #endif // FOO_2
    #endif  // FOO_3
    #endif  //
    #endif  // blargh
    #endif  // one tab
    #endif      // two tabs
    
    // Incorrect
    // Note that there are spaces and tabs below.
    #endif
    #endif 
    #endif          
    #endif  
    #endif                          
    #endif x
    #endif xxx
    #endif / xxx
    
    opened by arames 16
  • Shell - Command Chaining in place of if statement.

    Shell - Command Chaining in place of if statement.

    The shell style guide is relatively silent on the topic of using command chaining in place of an if statement. I would propose the following guidance be considered.

    In simple test and execute situations like the following:

    if [[ -z "${VARIABLE} ]]; then
      exit 1
    fi
    

    Simplify the code into a more compact form for readability.

    [[ -z "${VARIABLE}" ]] && exit 1
    
    opened by chuckwolber 10
  • Render python guide from markdown

    Render python guide from markdown

    Fixes #381 Fixes #357

    It turns out Github pages will automatically render markdown to html. So we just need to delete the old pyguide.html and that's it!

    See working version on my fork: https://sfdye.github.io/styleguide/pyguide.html or https://sfdye.github.io/styleguide/pyguide

    Ref: https://blog.github.com/2016-12-09-publishing-with-github-pages-now-as-easy-as-1-2-3/

    opened by sfdye 10
  • Cannot add intelij-java-google-style.xml to idea for checkstyle plugin

    Cannot add intelij-java-google-style.xml to idea for checkstyle plugin

    IDE: intelij idea

    version: 2018.1

    checkstyle plugin version: 5.18.5

    error:

    org.infernus.idea.checkstyle.exception.CheckStylePluginException: <html><b>The Checkstyle rules file could not be parsed.</b><br>Element type "html" must be declared.<br>The file has been blacklisted for 60s.</html>
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.lambda$blacklistAndShowMessage$0(CheckerFactory.java:198)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.blacklistAnd(CheckerFactory.java:222)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.blacklistAndShowMessage(CheckerFactory.java:194)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.blacklistAndShowMessage(CheckerFactory.java:234)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.createChecker(CheckerFactory.java:148)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.getOrCreateCachedChecker(CheckerFactory.java:77)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.checker(CheckerFactory.java:59)
    	at org.infernus.idea.checkstyle.checker.CheckerFactory.verify(CheckerFactory.java:47)
    	at org.infernus.idea.checkstyle.ui.LocationDialogue.attemptLoadOfFile(LocationDialogue.java:209)
    	at org.infernus.idea.checkstyle.ui.LocationDialogue.access$900(LocationDialogue.java:36)
    	at org.infernus.idea.checkstyle.ui.LocationDialogue$NextAction.actionPerformed(LocationDialogue.java:256)
    	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    	at java.awt.Component.processMouseEvent(Component.java:6541)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
    	at java.awt.Component.processEvent(Component.java:6306)
    	at java.awt.Container.processEvent(Container.java:2237)
    	at java.awt.Component.dispatchEventImpl(Component.java:4897)
    	at java.awt.Container.dispatchEventImpl(Container.java:2295)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    	at java.awt.Container.dispatchEventImpl(Container.java:2281)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    	at java.awt.EventQueue.access$500(EventQueue.java:98)
    	at java.awt.EventQueue$3.run(EventQueue.java:715)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    	at java.awt.EventQueue$4.run(EventQueue.java:737)
    	at java.awt.EventQueue$4.run(EventQueue.java:735)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:837)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:434)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    	at java.awt.Dialog.show(Dialog.java:1077)
    	at java.awt.Component.show(Component.java:1679)
    	at java.awt.Component.setVisible(Component.java:1631)
    	at java.awt.Window.setVisible(Window.java:1014)
    	at java.awt.Dialog.setVisible(Dialog.java:998)
    	at org.infernus.idea.checkstyle.ui.LocationDialogue.setVisible(LocationDialogue.java:162)
    	at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$AddLocationAction.actionPerformed(CheckStyleConfigPanel.java:276)
    	at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$ToolbarAction.run(CheckStyleConfigPanel.java:364)
    	at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$ToolbarAction.run(CheckStyleConfigPanel.java:359)
    	at com.intellij.ui.ToolbarDecorator$2.doAdd(ToolbarDecorator.java:440)
    	at com.intellij.ui.CommonActionsPanel$Buttons.performAction(CommonActionsPanel.java:60)
    	at com.intellij.ui.CommonActionsPanel$MyActionButton.actionPerformed(CommonActionsPanel.java:272)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:193)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:153)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:357)
    	at java.awt.Component.processEvent(Component.java:6306)
    	at java.awt.Container.processEvent(Container.java:2237)
    	at java.awt.Component.dispatchEventImpl(Component.java:4897)
    	at java.awt.Container.dispatchEventImpl(Container.java:2295)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    	at java.awt.Container.dispatchEventImpl(Container.java:2281)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    	at java.awt.EventQueue.access$500(EventQueue.java:98)
    	at java.awt.EventQueue$3.run(EventQueue.java:715)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    	at java.awt.EventQueue$4.run(EventQueue.java:737)
    	at java.awt.EventQueue$4.run(EventQueue.java:735)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:837)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:434)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    	at java.awt.Dialog.show(Dialog.java:1077)
    	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:694)
    	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:427)
    	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1682)
    	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1631)
    	at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:69)
    	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    	at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
    	at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:69)
    	at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:97)
    	at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:63)
    	at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:52)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:193)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:153)
    	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:357)
    	at java.awt.Component.processEvent(Component.java:6306)
    	at java.awt.Container.processEvent(Container.java:2237)
    	at java.awt.Component.dispatchEventImpl(Component.java:4897)
    	at java.awt.Container.dispatchEventImpl(Container.java:2295)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    	at java.awt.Container.dispatchEventImpl(Container.java:2281)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4719)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    	at java.awt.EventQueue.access$500(EventQueue.java:98)
    	at java.awt.EventQueue$3.run(EventQueue.java:715)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    	at java.awt.EventQueue$4.run(EventQueue.java:737)
    	at java.awt.EventQueue$4.run(EventQueue.java:735)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:837)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:762)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:434)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    
    opened by Ryan-Miao 10
  • Fixed

    Fixed "full hairy example" of formatting control string in Common Lisp style guide

    Example produced wrong results:

    CL-USER> (format nil "Items:~#[ none~; ~S~; ~S and ~S~:;[email protected]{~#[~; and~] ~S~^ ,~}~]." :foo :bar :baz :kadabr)
    "Items: :FOO , :BAR , :BAZ , and :KADABR."
    

    With this fix, it uses commas correctly:

    CL-USER> (format nil "Items: ~#[ none~; ~S~; ~S and ~S~:;[email protected]{~S~^~#[~; and ~:;, ~]~}~]." :foo :bar :baz :kadabr)
    "Items: :FOO, :BAR, :BAZ and :KADABR."
    
    cla: yes 
    opened by svetlyak40wt 10
  • C++ Style Guide: 64-bit Portability conflicts with Integer Types section

    C++ Style Guide: 64-bit Portability conflicts with Integer Types section

    Under 64-bit Portability, the guide advises:

    Use the LL or ULL suffixes as needed to create 64-bit constants.

    Yet, the Integer Types section states:

    stdint.h defines types like int16_t, uint32_t, int64_t, etc. You should always use those in preference to short, unsigned long long and the like, when you need a guarantee on the size of an integer.

    Therefore, it seems that the 64-bit Portability section should instead advise developers to use the INTn_C() and UINTn_C() macros, defined in stdint.h (or cstdint). See:

    http://en.cppreference.com/w/c/types/integer
    http://en.cppreference.com/w/cpp/header/cstdint
    

    BTW, if any rationale was given to prefer stdint.h over cstdint, I seem to have missed it.

    opened by mattgruenke 10
  • cpplint: allow using-directive for user-defined literals namespaces

    cpplint: allow using-directive for user-defined literals namespaces

    This change adds an exception to the using namespace directives check, to allow user-defined literals namespaces for source files (not headers).

    • http://en.cppreference.com/w/cpp/chrono/operator%22%22h
    opened by Sarcasm 9
  • Cpplint is unnecessarily polluting stderr

    Cpplint is unnecessarily polluting stderr

    This solves #181. Allows to separate errors and normal output into separate streams. Useful when standard output is to be redirected to /dev/null leaving only errors.

    opened by LukeCz 9
  • pyguide HTML was stale for 5 years then suddenly deprecated

    pyguide HTML was stale for 5 years then suddenly deprecated

    So surprise! https://github.com/google/styleguide/commit/1707ccb7d18e4980870ce0ea6ab3d380f9a36a30

    https://google.github.io/styleguide/pyguide.html

    Revision 2.59 This is an obsolete unmaintained copy of the style guide. Please use pyguide.md instead.

    I know of tons of people/companies that were leveraging this as the law of Python. (or at least a 3rd party reference/supplicant to the PEP)

    As per https://github.com/google/styleguide/commit/1707ccb7d18e4980870ce0ea6ab3d380f9a36a30#commitcomment-29815046

    Is it possible to:

    1. completely delete the content (retain the stub landing page for manual user redirect)
    • -- no point in keeping it around if it's been dead for 5 years
    1. someone from Google please do an assessment of "what's changed" over the past 5 years
    • -- compare HTML to MD -- and provide a "1-year-shelf-life" matrix that tries to succinctly describe the major differences so that people can easily consume the new style guide

    Would be awesome! Thank you.

    opened by mcallaghan-sandvine 7
  • intellij-java-google-style.xml puts static imports last

    intellij-java-google-style.xml puts static imports last

    According to 
    
    http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.3-import-o
    rdering-and-spacing
    
    "Import statements are divided into the following groups, in this order, with 
    each group separated by a single blank line:
    1. All static imports in a single group ..."
    
    static imports should come first. But in intellij-java-google-style.xml they 
    are listed as last:
    
    https://code.google.com/p/google-styleguide/source/browse/trunk/intellij-java-go
    ogle-style.xml#251
    
    Steps to reproduce
    1. Open the attached Test.java in IntelliJ
    2. In IntelliJ IDEA, do Reformat Code (CTRL+ALT+L on Windows)
    3. Check "Organize Import" and "Rearrange Entries"
    4. Click OK
    
    What is the expected output? 
    
    package test;
    
    import static java.lang.System.out;
    
    import java.text.NumberFormat;
    
    public class Test {
    
        public void test() {
          out.println(NumberFormat.getInstance().format(Math.PI));
        }
    }
    
    
    What do you see instead?
    
    package test;
    
    import java.text.NumberFormat;
    
    import static java.lang.System.out;
    
    public class Test {
    
        public void test() {
          out.println(NumberFormat.getInstance().format(Math.PI));
        }
    }
    
    What version of the product are you using? 
    
    * r134 of intellij-java-google-style.xml
    * IntelliJ IDEA 13.03
    * JRE 1.7.0_40-b43 x86
    
    On what operating system?
    * Windows 7 Enterprise (V 6.1 SP1)
    
    Please provide any additional information below.
    
    I attached the corrected intellij-java-google-style.xml to places the static 
    imports first as per the code style.
    

    Original issue reported on code.google.com by [email protected] on 8 Jul 2014 at 5:39

    Attachments:

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 7
  • Removed RAS (redundant acronym syndrome) syndrome

    Removed RAS (redundant acronym syndrome) syndrome

    References to HTTPS and HTTP were written as HTTPS protocol (Hypertext Transfer Protocol Secure protocol) and HTTP protocol (Hypertext Transfer Protocol protocol) which is redundant.

    cla: yes 
    opened by clingeric 6
  • Trivial typofix

    Trivial typofix

    s/Vimscript/Vim script/

    The below does not seem to apply to this changeset:


    These style guides are copies of Google's internal style guides to assist developers working on Google owned and originated open source projects. Changes should be made to the internal style guide first and only then copied here.

    Unsolicited pull requests will not be merged and are usually closed without comment. If a PR points out a simple mistake — a typo, a broken link, etc. — then the correction can be made internally and copied here through the usual process.

    Substantive changes to the style rules and suggested new rules should not be submitted as a PR in this repository. Material changes must be proposed, discussed, and approved on the internal forums first.

    opened by ujihisa 1
  • Please consider maintaining the Emacs-Lisp files in a separate repository

    Please consider maintaining the Emacs-Lisp files in a separate repository

    I have read the instructions in the input field used to create this issue and I do realize that this request does in some ways violate that.

    But please consider this proposal anyway. So this style guide is intended for internal use at Google. That probably means it should not be distributed on Melpa.

    We are happy to continue to distribute it on Melpa as that is probably how most of the emacs-using googlers install it, but we have requirements too, which have to be met by packages that we distribute, and one of them is that the elisp libraries are not distributed in such large repositories that contain much more than the elisp files.

    What follows is the text used to open many such requests:


    This repository contains one or more Emacs-Lisp libraries, which are distributed on Melpa for easy installation using Emacs' official package manager (package.el) and are also mirrored on the Emacsmirror.

    This project/repository is about much more than just the elisp libraries. These libraries are tucked away in some "contrib" or "utilities" directory. The maintainers of the project as a whole likely care little about these libraries, which makes it a less than optimal place to maintain them. The maintainers will always have something more important to deal with and potential contributors are likely scared away by the additional processes and conventions that such a large project needs, but which are overkill when looking at the elisp libraries in isolation.

    I would like to propose that the Emacs-Lips libraries are maintained in a separate repository. Doing that would solve a few issues and have additional benefits:

    • Distributing a package that originates in such a large repository puts additional strain on the Melpa server. Fetching the repository takes longer and they require more space. We are already trying to deal with the latter, but not very successfully and this leads to special-cases in the tooling, which come with additional maintenance costs. See https://github.com/melpa/melpa/issues/5361, also for some past discussion.

    • I also maintain the Emacsmirror and here the costs are much higher than for Melpa. The Emacsmirror does not just distribute installable snapshots of a package, as Melpa does.

      Instead it mirrors the upstream repository. But in cases like this, where the repository contains much more than just the elisp libraries, it filters the history, using tools such as git filter-repo and git subtree. Unfortunately these tools are not very reliable and highly inefficient when continuously rewriting large repositories like this one.

      Currently this affects just 33 out of 8485 on the Emacsmirror, and the disproportionate amount of work that it takes to maintain the tooling for these special-cases is just not worth it. So I have decided to phase out support, but not before making an effort to get as many of these Emacs package slit out of the repositories they are currently being maintained in.

    • For maintainers of this repository any issue about the elisp libraries is likely just more noise. They have better things to do.

    • On the other hand, the original authors of the elisp libraries and people who have contributed to them, likely have notifications for this repository disabled because they only contribute to the elisp parts and there would just be too much noise otherwise. So issues and pull-requests by users are likely to go unnoticed for a long time.

      The author and contributors likely have to be explicitly summoned, as I am doing now: @eccentricon @rex4539

    • Potential contributors are discouraged when their pull-requests are being "ignored" or they might be discouraged by the additional requirements imposed by the project as a whole, and not even try to contribute as a result.

    • Users who install elisp packages by manually cloning their repositories and then manually adding the appropriate directories to the load-path, are forced to clone a huge repository just to get their hands on a few elisp libraries in some subdirectory. (Or they can use the filtered repositories on the Emacsmirror, but as I mentioned, those are going away.)

    So in summary, I think there are many downsides to maintaining the elisp libraries in this repository. I am not sure there are any upsides, except that it is the status quo.

    Moving the elip libraries out of here is some work, that someone has to do, but most of that work is already done. You can just clone the respective repository from the Emacsmirror (at https://github.com/emacsmirror/google-c-style) and publish it somewhere else. (Please check that no recent history is missing and if the mirror repository is not uptodate, then ping me.)

    Once you have done that tell me about it here, and I will take care of updating Melpa and the Emacsmirror.

    Thanks for considering! Jonas

    opened by tarsius 0
  • Eclipse format changes single-line javadocs

    Eclipse format changes single-line javadocs

    The eclipse-java-google-style.xml specifies that javadoc should always be the "basic" format:

    The basic formatting of Javadoc blocks is as seen in this example:
    
    /**
     * Multiple lines of Javadoc text are written here,
     * wrapped normally...
     */
    public int method(String p1) { ... }
    

    but that single-line javadocs are allowed when it fits on one line.

    Other tools (like that google formatter in spotless maven plugin) reflows this to a single line when possible.

    The solution is to change one settings in the eclipse format profile to be:

    <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
    
    opened by bentatham 0
  • Eclipse java style does not specify space between import groups

    Eclipse java style does not specify space between import groups

    As per the Java Style Guide:

    If there are both static and non-static imports, a single blank line separates the two blocks.

    But the eclipse-java-google-style.xml specifies a value of 0, when it should be 1.

    <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0"/>
    

    It seems that the Google formatter implementation for Eclipse does not organize imports, so you have to separately configure the Organize Imports ordering in Eclipse settings, but then this value removes the line between static and non-static imports.

    opened by bentatham 0
  • Update style.scss

    Update style.scss

    These style guides are copies of Google's internal style guides to assist developers working on Google owned and originated open source projects. Changes should be made to the internal style guide first and only then copied here.

    Unsolicited pull requests will not be merged and are usually closed without comment. If a PR points out a simple mistake — a typo, a broken link, etc. — then the correction can be made internally and copied here through the usual process.

    Substantive changes to the style rules and suggested new rules should not be submitted as a PR in this repository. Material changes must be proposed, discussed, and approved on the internal forums first.

    opened by ibrahimmemonn 0
Owner
Google
Google ❤️ Open Source
Google
Materials for CSGO Video Game Hacking workshop Google DSC 2021-2022

Intro to Video Game Hacking Workshop for UBCO Google DSC All of the code is in the Internal Cheat Project. The DSC Internal Demo was the code that we

Jordan Ribbink 1 Oct 26, 2021
2017-2019 math projects

Project Mathematics All the projects Name Language Grade Year 101 Pong Python3 16.2/20 2017 102 Architect Python3 19.8/20 2017 103 Cipher C 17.2/20 20

Luis Rosario 12 Mar 1, 2022
My projects while i learn C language.

Coding Exercises Projects that i made while i am learning C language. Exercise 1: prime-numbers.c It is a program that checks whether the given number

Berkay Şahin 2 Apr 12, 2022
An open source, OOP language with editable syntax.

Copper An Open source compiled programming language, In development. Goals Copper is an general-purpose OOP language. Coppers main goal is to allow ea

null 13 Nov 18, 2022
Open multi-methods for C++11

YOMM11 IS DEPRECATED Thank you for the stars and the feedback! In 2017 I learned the D language, and I implemented an open method library for D. In th

Jean-Louis Leroy 116 Nov 14, 2022
An Repositery with Ghost eShop Homebrew Source Code

Ghost-Eshop-Alternative-3DS An Alternative eShop for Nintendo 3DS This is a clone of Universal-Updater Download Requirement -Latest version available

Ghost0159 42 Nov 14, 2022
BRL-CAD's main source code

BRL-CAD Release 7.32.4 http://brlcad.org/ BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system that incl

BRL-CAD 198 Nov 30, 2022
Cmusic source code, based on the CARL 0.2.0 distribution

CMUSIC These are the sources and makefiles for a build of the classic CARL cmusic and related programs. The build has been tested on OSX and Linux, an

null 7 Sep 16, 2022
Supplemental source code for "A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision".

This repository provides source code to reproduce some of the results of my paper "A Halfedge Refinement Rule for Parallel Catmull-Clark Subdivision". The key contribution of this paper is to provide super simple algorithms to compute Catmull-Clark subdivision in parallel with support for semi-sharp creases. The algorithms are compiled in the C header-only library CatmullClark.h. In addition you will find a direct GLSL port of these algorithms in the glsl/ folder. For various usage examples, see the examples/ folder.

Jonathan Dupuy 23 Nov 18, 2022
Basic Fortnite Internal Cheat Source

Basic Fortnite Internal Cheat Source That's a basic fortnite cheat internal source for pasters and for people that just want to learn from it. This is a trash code that will be improved when I have time and when I want.

Android1337 13 Jun 13, 2022
Programming-Basics - This Repository Contains source codes of various programming languages. Please Contribute to make this Useful.

Programming-Basics About ❓ Want To Start your Open-Source Journey Without Facing Difficulties?,If Yes, Then You Are at The Right Place! ?? Don't Know

Mr. Ånand 67 Oct 22, 2022
GalaxyEngine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.

GalaxyEngine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.

null 276 Nov 29, 2022
There are several guides for kernel developers and users

There are several guides for kernel developers and users

Developer From Jokela 2 Dec 25, 2021
Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.

Sharpmake Introduction Sharpmake is a generator for Visual Studio projects and solutions. It is similar to CMake and Premake, but it is designed for s

Ubisoft 777 Nov 25, 2022
Single source file ASTC texture decompression in C++ (derived from Google's open source Android project)

astc_dec astc_dec is a single source file ASTC texture decompressor with the Apache 2.0 license, derived from Google's open source Android sources. Th

Rich Geldreich 30 Oct 22, 2022
miniz: Single C source file zlib-replacement library, originally from code.google.com/p/miniz

Miniz Miniz is a lossless, high performance data compression library in a single source file that implements the zlib (RFC 1950) and Deflate (RFC 1951

Rich Geldreich 1.6k Nov 23, 2022
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

MySQL 8.5k Nov 24, 2022
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 152 Nov 28, 2022
C++ open hierarchy RTTI framework for embedded projects

Open-hierarchy custom RTTI for C++17 and up with support for multiple inheritance and dynamic casting.

Roy van Dam 16 Nov 30, 2022
Googletest - Google Testing and Mocking Framework

GoogleTest OSS Builds Status Announcements Release 1.10.x Release 1.10.x is now available. Coming Soon Post 1.10.x googletest will follow Abseil Live

Google 28.5k Nov 25, 2022