West Yorkshire Police have cordoned off an area of Marina Terrace in Golcar after being called to the street at 1.30am on Saturday morning.
No injuries have been reported and police are treating it as a targeted attack.
Detective Superintendent Nicola Bryar said: "Our investigation is at an early stage but we believe this incident was a targeted attack and luckily no one was injured.
"We believe the suspects left the scene in a vehicle.
"It’s understood this incident is linked to the criminal damage of a vehicle at the location earlier on at about 11.30pm.
"We take all reports of firearms extremely seriously and there is no place for this criminal activity on our streets.
"Neighbourhood patrols will be in the area today to provide reassurance to any residents who may have concerns.”
Anyone with information should contact police on 101 quoting log 121 of April 6.