question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add codestyle to git

See original GitHub issue

Summary:

The codestyle should be a part of the project and require no setup for a new contributor

Steps to reproduce:

Clone the project and go to a file, press ctrl+alt+l and see the file will be changed.

Would you like to work on the issue?

I think this would be best if somebody with an already correct style configured were to do this.

Just adding this to the .gitignore should be sufficient

# IDEA/Android Studio Ignore exceptions
!/.idea/inspectionProfiles/
!/.idea/codeStyles/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
macgillscommented, Mar 12, 2020

Just for clarification, who do you refer to as “people” here? Contributors?

Contributors, frogmen, mermaids, skeletor, whoever can submit a pr to this repo.

If a file is in git then it can be changed and trying to enshrine it seems like something we should not do. Just treat it like any other file and educate people on IntelliJ/Android Studio functionality.

I have a local branch for the documentation update and am awaiting access to the repo.

0reactions
sivaraamcommented, Mar 12, 2020

@sivaraam looks like the user resolved it.

@macgills Yeah, he has.

A part of having our codestyle in git is that people can change it if they so wish, …

Just for clarification, who do you refer to as “people” here? Contributors?

… we should just reject anything done accidentally.

To clarify, I’m not against keep the code style in Git. I was just wondering if we could avoid such accidental changes while keeping the file Git. 🤔

The closest I could find is https://stackoverflow.com/a/936290/5614968 (the git update-index --assume-unchange part). But that’s in the hands of the contributors. Not sure if there are any better ways.

I was going to make a documentation update, I asked a question somewhere about whether the issue should be here or on the documentation repo. I’ll just go do it on the doc repo

Yeah, the wiki has been moved to the documentation repo. So, that would be right place. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to share Code Style settings between developers in IntelliJ
Code Style can be copied to project and saved in .idea/codeStyles to be shared via version control: Copy to Project Click this button...
Read more >
Creating and highlighting code blocks - GitHub Docs
Share samples of code with fenced code blocks and enabling syntax highlighting.
Read more >
Code style schemes | IntelliJ IDEA Documentation - JetBrains
Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. · Select the language for which you want to configure...
Read more >
Automatic Code Formatting with git | by Harshit Bangar | Medium
While code formatting is critical for styling, spending time on it is futile. ... git add $(echo "$files" | paste -s -d "...
Read more >
Documentation Style Guide - GitLab Docs
Code block style is easier to copy and paste in a user's terminal window. To apply code block style, wrap the text in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found