You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by prabhjyotsingh <gi...@git.apache.org> on 2015/08/19 13:37:08 UTC

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

GitHub user prabhjyotsingh opened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/229

    ZEPPELIN-235: jscs in zeppelin-web

    used following for .jscsrc
    
    {
      "preset": "google",
      "maximumLineLength": {
        "value": 120,
        "allExcept": [ "comments", "regex"]
      }
    }

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/prabhjyotsingh/incubator-zeppelin ZEPPELIN-235

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/229.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #229
    
----
commit 524a4a6a270b63b3569ced171d8dba05d437fafc
Author: Prabhjyot Singh <pr...@gmail.com>
Date:   2015-08-19T09:49:47Z

    ZEPPELIN-235: jscs in zeppelin-web

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-149836145
  
    Closing this, will open up again with fixed changes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-133779847
  
    We might have to work on the configuration for indentation.
    
    ### Example:
    
    #### current formatting in this branch
    ```
    angular.module('zeppelinWebApp').controller('ParagraphCtrl',
      function($scope, $rootScope, $route, $window, $element, $routeParams, $location, $timeout, $compile,
               websocketMsgSrv) {
    ```
    Gives a 4 spaces prefix indent for the function code
    
    
    #### One line formatting
    ```
    angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $rootScope, $route, $window, $element, $routeParams, $location, $timeout, $compile, websocketMsgSrv) {
    ```
    Gives a 2 spaces prefix indent for the function code but obviously more than 120 characters line.
    
    #### Super line formatting
    ```
    angular
      .module('zeppelinWebApp')
      .controller('ParagraphCtrl',
                  function($scope, $rootScope, $route, $window, $element, $routeParams, $location, $timeout, $compile,
                            websocketMsgSrv) {
    ```
    or
    ```
    angular
      .module('zeppelinWebApp')
      .controller('ParagraphCtrl',
                  function($scope,
                            $rootScope,
                            $route,
                            $window,
                            $element,
                            $routeParams,
                            $location,
                            $timeout,
                            $compile,
                            websocketMsgSrv) {
    ```
    Then I have jscs errors asking for a 16 spaces prefix indent for the function code.
    
    
    In the end, I'm not sure which indenting is the best.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh closed the pull request at:

    https://github.com/apache/incubator-zeppelin/pull/229


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-134286869
  
    Well I'm using Intellij Idea, and on pressing Control + Shift + A spawns up this menu, which does the job. I'm sure similar option should be available in other IDEs as well.
    
    <img width="432" alt="screen shot 2015-08-24 at 9 47 24 pm" src="https://cloud.githubusercontent.com/assets/674497/9445450/d0d07086-4aa9-11e5-9d72-72eb4a5407c3.png">
    
    If the plugin is not already installed here is how to:
    https://www.jetbrains.com/idea/help/using-javascript-code-quality-tools.html#installJSCS


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-134127299
  
    Sure giving a 4 spaces prefix indent for the function code, makes code look slightly more cleaner. 
    
    I thought of 120 characters in line, because in my view this should fit in most of the monitors. If not 120 characters what can be the right value?
    
    But what I would prefer is using one of the standard template from the following list
    https://github.com/jscs-dev/node-jscs/tree/master/presets



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-134494232
  
    Can we start something basic, and then keep improvising it on the need basis?
    Also, I thought  "preset": "google" will take care of  a lot of things.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-134234729
  
    Our base is the google guideline, so using its prefix sounds good.
    But I'm having some trouble when re-indenting the code in my text editor.
    Especially when it comes to breaking down some lines.
    So I think I'm gonna have to check how to do this more in the google rules, and see if it needs a few modifications. Maybe also checkout the other presets at the same time



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-132926557
  
    @corneadoug Intellij Idea fixed most if not all of the issues. However if build fails, or if there are errors in merging this to master, this will surly need help. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: ZEPPELIN-235: jscs in zeppelin-we...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/229#issuecomment-132894654
  
    I guess there might be plenty of errors, do you need help cleaning them?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---