Ali (Radhiallahu anhu) mentioned that the good friend and neighbour has the following qualities:
Forgive the shortcomings of the friend
Show pity to the friend's difficulties
Conceal his shortcomings
Overlook his excuses
Accept his forgiveness
Stop the backbiting spoken of the friend
Always be with the friend
Protect the friendship
Fulfil the needs of the friend
Visit him when he is sick
When he dies, be present at his Janazah
When invited, accept his invitation
If he gives a gift, accept it
If he does good, then reciprocate accordingly
When the friend offers a bounty, then thank him
When he needs help then assist him
Preserve the honour and respect of your friend and his house
Fulfil his needs that accord with Shariáh
Accept his intercession if it is according to Shariáh
Do not make him despondent in his requests
Reply to the friend's sneeze by saying "Yarhmukallahu" if he
said 'Alhamdulillah'
If anything is lost of the friend, then assist him to look for it
Reply to his Salaam
Support and praise his good works
If one has taken an oath to fulfil something, assist him in
accomplishing the oath
Assist your friend at all times whether he is an oppressor or
oppressed. Assisting him if he is an oppressor is to stop him from
oppression.
Also communicate with him and not to create animosity.
Not to disgrace a friend
Not to swear at a friend