Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank line found at start of control structure #11117

Merged
merged 1 commit into from
Sep 29, 2017
Merged

Blank line found at start of control structure #11117

merged 1 commit into from
Sep 29, 2017

Conversation

mayankzalavadia
Copy link
Contributor

@mayankzalavadia mayankzalavadia commented Sep 28, 2017

Blank line found at start of control structure

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@orlangur orlangur self-assigned this Sep 28, 2017
@orlangur
Copy link
Contributor

Please force push a branch so that there is no invalid cd11191 commit.

Blank line found at start of control structure

Please provide more details on this into PR description - is this some PhpStorm inspection?

@mayankzalavadia
Copy link
Contributor Author

I have use magento-coding-standard tool for check.

@orlangur
Copy link
Contributor

Some of https://github.com/magento-ecg/coding-standard https://github.com/magento/marketplace-eqp?

Changes related to "Blank line found at start of control structure" look useful to me, not sure if there are any plans to enforce core with this set of sniffs.

@mayankzalavadia
Copy link
Contributor Author

mayankzalavadia commented Sep 28, 2017

I have use https://github.com/magento/marketplace-eqp tool for testing.
Can you please let me know this changes is okey or not.? So, next time I'll take care of this things before commit.

@orlangur
Copy link
Contributor

It looks like you continued work from branch related to other PR.

Please squash changes into single commit with Blank line found at start of control structure message not touching the phtml file I mentioned.

I can assist you with exact git commands if needed.

@mayankzalavadia
Copy link
Contributor Author

mayankzalavadia commented Sep 28, 2017

Yes, Can you please assist me with exact git commands. I have also tried to force push a branch.

@orlangur
Copy link
Contributor

  1. git checkout develop
  2. Assure there are no changes in working tree with git status
  3. git checkout -b develop-old
  4. git branch -D develop
  5. git checkout mainline/develop - or however you call the https://github.com/magento/magento2/ remote instead of "mainline"
  6. git checkout -b develop
  7. git merge --squash develop-old
  8. git reset app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml so that it will not be a part of new commit
  9. git commit -m"Clean up code but getting read of 'Blank line found at start of control structure' coding standard violations"
  10. git push -f my - where "my" is the name of remote corresponding to your repo

@mayankzalavadia
Copy link
Contributor Author

I have done as you mention. Now is it okay or I need do any other thing?

@orlangur
Copy link
Contributor

Commits 4

I don't see the changes, there should be only one commit after you did mentioned steps.

Please post CLI commands you entered together with their output here.

@mayankzalavadia
Copy link
Contributor Author

root@mayank:/var/www/html/contribution/m220$ git checkout develop
Already on 'develop'
root@mayank:/var/www/html/contribution/m220$ git status
On branch develop

It took 5.05 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working directory clean
root@mayank:/var/www/html/contribution/m220$ git checkout -b develop-old
fatal: A branch named 'develop-old' already exists.
root@mayank:/var/www/html/contribution/m220$ git branch -D develop
error: Cannot delete the branch 'develop' which you are currently on.
root@mayank:/var/www/html/contribution/m220$ git checkout -b develop--old
Switched to a new branch 'develop--old'
root@mayank:/var/www/html/contribution/m220$ git branch -D develop
Deleted branch develop (was 81134b7).
root@mayank:/var/www/html/contribution/m220$ git checkout origin/develop
Note: checking out 'origin/develop'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b

HEAD is now at 81134b7... Blank line found at start of control structure
root@mayank:/var/www/html/contribution/m220$ git checkout -b develop
Switched to a new branch 'develop'
root@mayank:/var/www/html/contribution/m220$ git merge --squash develop--old
(nothing to squash)Already up-to-date.
root@mayank:/var/www/html/contribution/m220$ git merge --squash develop-old
(nothing to squash)Already up-to-date.
root@mayank:/var/www/html/contribution/m220$ git merge --squash develop--old
(nothing to squash)Already up-to-date.
root@mayank:/var/www/html/contribution/m220$ git reset app/code/Magento/LayeredNavigation/view/frontend/templates/layer/filter.phtml
root@mayank:/var/www/html/contribution/m220$ git commit -m "Clean up code but getting read of 'Blank line found at start of control structure' coding standard violations"
On branch develop

It took 10.01 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working directory clean
root@mayank:/var/www/html/contribution/m220$ git push -f origin develop
Everything up-to-date
root@mayank:/var/www/html/contribution/m220$

@mayankzalavadia
Copy link
Contributor Author

Please check above my last comment. Is it okay or I need to do anything else?

@orlangur
Copy link
Contributor

root@mayank:/var/www/html/contribution/m220$ git checkout origin/develop
Note: checking out 'origin/develop'.

It looks like origin is name of your repository remote. You need to add https://github.com/magento/magento2.git as another remote.

git remote add mainline https://github.com/magento/magento2.git
git fetch mainline
git remote rename origin my

And then repeat steps using "mainline" and "my" remotes names.

@orlangur
Copy link
Contributor

Great! 👍 Seems like it worked now.

@mayankzalavadia
Copy link
Contributor Author

Thank you for assisting me.

@orlangur
Copy link
Contributor

@mayankzalavadia please use another branch than develop for unrelated changes.

git checkout -b NEW-BRANCH to keep unrelated commit in another branch and then

git checkout develop
git reset --hard 3fa78fd
git push -f my

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants