GithubHelp home page GithubHelp logo

indentation bear about coala-bears HOT 11 CLOSED

coala avatar coala commented on August 26, 2024
indentation bear

from coala-bears.

Comments (11)

sils avatar sils commented on August 26, 2024

depends on #250

from coala-bears.

sils avatar sils commented on August 26, 2024

#250 is in review and work can be build upon that

from coala-bears.

sils avatar sils commented on August 26, 2024

similar to our matlabindentationbear

from coala-bears.

sils avatar sils commented on August 26, 2024

see https://github.com/coala-analyzer/coala/blob/master/bears/matlab/MatlabIndentationBear.py for initial approach, something like that could work well for basic indentation checking. We then need to add things like correct bracket positions and stuff like that, should be possible.

from coala-bears.

sils avatar sils commented on August 26, 2024

From @AbdealiJK on February 16, 2016 11:46

@sils1297 why not use a language specific linter in such cases ? Writing your own logic is tiresome and not required IMO
Like indent for C languages
PEP8 does this for python
PHP lint does it for php
etc etc

from coala-bears.

sils avatar sils commented on August 26, 2024

because having one indentation engine that is usable for lots of languages
would be awesome, remember the goal of coala is not to just wrap linters
but also allow creation of new routines for new languages. That also makes
it very easy to at least provide some basic indentation support for
whatever languages users demand.

2016-02-16 12:46 GMT+01:00 AbdealiJK [email protected]:

@sils1297 https://github.com/sils1297 why not use a language specific
linter in such cases ? Writing your own logic is tiresome and not required
IMO
Like indent for C languages


Reply to this email directly or view it on GitHub
coala/coala#225 (comment)
.

from coala-bears.

sils avatar sils commented on August 26, 2024

From @Makman2 on February 16, 2016 17:36

agreeing with @sils1297. Even though we focus on providing functionality by implementing linters, self-written bears need utilities for code-analysis :)

from coala-bears.

sils avatar sils commented on August 26, 2024

From @Redridge on February 18, 2016 18:31

As @sils1297 said, this requires much more planning than I initially thought. I say better leave it for now.

from coala-bears.

sils avatar sils commented on August 26, 2024

Can you share your experiences and drafts so we can build on it the next
time?

2016-02-18 19:31 GMT+01:00 Alexandros Dimos [email protected]:

As @sils1297 https://github.com/sils1297 said, this requires much more
planning than I initially thought. I say better leave it for now.


Reply to this email directly or view it on GitHub
coala/coala#225 (comment)
.

from coala-bears.

sils avatar sils commented on August 26, 2024

From @abhsag24 on February 21, 2016 12:21

decisions:

  1. will take indent_types , and comments as dict parameters , where the key is a start_indent and value is an end_indent , for comments the key and value pair are useful for multi-line comments, where key can be start of comment and value the end.
  2. Languages like python can have end_indent as None.
  3. Basic structure to be initially like MatlabIndentationBear but i do believe it will be totally different by the final version.

from coala-bears.

sils avatar sils commented on August 26, 2024

From @Redridge on February 21, 2016 13:5

Here is my draft from when I tried it.
https://github.com/Redridge/coala/commit/ca8df0cbdb2e885d77e948a838386c9e3eed0da4

It is able to:

  • Get the dict out of .coalang files using LanguageDefinition
  • Indent C files without comments or missleading strings (with ';', '{', '}' int them)

I don't know if it is of much help though

from coala-bears.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.