peterhudec/authomatic

View on GitHub

Showing 126 of 222 total issues

Function events has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    events : function () {
      var self = this;

      $(this.scope)
        .on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
Severity: Minor
Found in examples/gae/showcase/static/js/foundation/foundation.joyride.js - About 1 hr to fix

    Function css has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        css : function (dropdown, target) {
          if (dropdown.parent()[0] === $('body')[0]) {
            var position = target.offset();
          } else {
            var position = target.position();
    Severity: Minor
    Found in examples/gae/showcase/static/js/foundation/foundation.dropdown.js - About 1 hr to fix

      Function pos_phone has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          pos_phone : function (init) {
            var tip_height = this.outerHeight(this.settings.$next_tip),
                tip_offset = this.settings.$next_tip.offset(),
                target_height = this.outerHeight(this.settings.$target),
                $nub = $('.joyride-nub', this.settings.$next_tip),
      Severity: Minor
      Found in examples/gae/showcase/static/js/foundation/foundation.joyride.js - About 1 hr to fix

        Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, settings, adapter, provider_name, session=None,
        Severity: Major
        Found in authomatic/providers/__init__.py - About 1 hr to fix

          Function _fetch has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def _fetch(self, url, method='GET', params=None, headers=None,
          Severity: Major
          Found in authomatic/providers/__init__.py - About 1 hr to fix

            Function create_request_elements has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def create_request_elements(
            Severity: Major
            Found in authomatic/providers/oauth1.py - About 1 hr to fix

              Function access has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def access(self, url, params=None, method='GET', headers=None,
              Severity: Major
              Found in authomatic/providers/__init__.py - About 1 hr to fix

                Function cookie has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var config = $.cookie = function (key, value, options) {
                
                    // write
                    if (value !== undefined) {
                      options = $.extend({}, config.defaults, options);
                Severity: Minor
                Found in examples/gae/showcase/static/js/foundation/foundation.cookie.js - About 1 hr to fix

                  Function login has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def login(self, adapter, provider_name, callback=None,
                                session=None, session_saver=None, **kwargs):
                          """
                          If :data:`provider_name` specified, launches the login procedure for
                          corresponding :doc:`provider </reference/providers>` and returns
                  Severity: Minor
                  Found in authomatic/core.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function post has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def post(self, provider_name):
                          self.response.write('<a href="..">Home</a>')
                  
                          # Retrieve the message from POST parameters and the values from
                          # cookies.
                  Severity: Minor
                  Found in examples/gae/credentials/main.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function add_metaclass has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def add_metaclass(metaclass):
                      """Class decorator for creating a class with a metaclass."""
                      def wrapper(cls):
                          orig_vars = cls.__dict__.copy()
                          slots = orig_vars.get('__slots__')
                  Severity: Minor
                  Found in authomatic/six.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function _x_user_parser has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _x_user_parser(user, data):
                          _users = data.get('users', [])
                          if _users and _users[0]:
                              _user = _users[0]
                              user.id = _user.get('id')
                  Severity: Minor
                  Found in authomatic/providers/oauth1.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function refresh_custom_select has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      refresh_custom_select : function ($select) {
                        var self = this;
                        var maxWidth = 0,
                          $customSelect = $select.next(),
                          $options = $select.find('option');
                  Severity: Minor
                  Found in examples/gae/showcase/static/js/foundation/foundation.forms.js - About 1 hr to fix

                    Function init has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        init : function (scope, method, options) {
                          var self = this;
                          this.scope = scope || this.scope;
                    
                          if (typeof method === 'object') {
                    Severity: Minor
                    Found in examples/gae/showcase/static/js/foundation/foundation.topbar.js - About 1 hr to fix

                      Function events has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          events : function () {
                            var self = this;
                      
                            $(this.scope)
                              .on('click.fndtn.section', '[data-section] .title', function (e) {
                      Severity: Minor
                      Found in examples/gae/showcase/static/js/foundation/foundation.section.js - About 1 hr to fix

                        Function access has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def access(self, credentials, url, params=None, method='GET',
                        Severity: Major
                        Found in authomatic/core.py - About 1 hr to fix

                          Function request_elements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def request_elements(
                          Severity: Major
                          Found in authomatic/core.py - About 1 hr to fix

                            Function index has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def index():
                                if fa.result:
                                    if fa.result.error:
                                        return fa.result.error.message
                                    elif fa.result.user:
                            Severity: Minor
                            Found in examples/flask/flask_authomatic/main.py - About 55 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Function create_request_elements has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def create_request_elements(self, request_type, credentials,
                            Severity: Major
                            Found in authomatic/providers/__init__.py - About 50 mins to fix

                              Function get has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def get(cls, key, default=None):
                                      """
                                      Resembles the :meth:`dict.get` method.
                              
                                      :returns:
                              Severity: Minor
                              Found in authomatic/extras/gae/__init__.py - About 45 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language